Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
d1dd9b93
Commit
d1dd9b93
authored
Jul 08, 2004
by
gbazin
Browse files
* modules/gui/wxwindows/interface.cpp: center the volume control on the toolbar.
parent
0cbf54fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/gui/wxwindows/interface.cpp
View file @
d1dd9b93
...
...
@@ -384,7 +384,7 @@ void Interface::CreateOurMenuBar()
menubar
->
GetTextExtent
(
menubar
->
GetLabelTop
(
i
),
&
i_width
,
&
i_height
);
i_size
+=
i_width
+
#if defined(__WXGTK__)
2
0
/* approximate margin */
;
2
2
/* approximate margin */
;
#else
4
/* approximate margin */
;
#endif
...
...
@@ -410,25 +410,33 @@ public:
private:
DECLARE_EVENT_TABLE
()
int
i_y_offset
;
};
BEGIN_EVENT_TABLE
(
VLCVolCtrl
,
wxControl
)
EVT_PAINT
(
VLCVolCtrl
::
OnPaint
)
END_EVENT_TABLE
()
#if defined(__WXGTK__)
#define VLCVOL_HEIGHT p_parent->GetSize().GetHeight()
#else
#define VLCVOL_HEIGHT TOOLBAR_BMP_HEIGHT
#endif
VLCVolCtrl
::
VLCVolCtrl
(
intf_thread_t
*
p_intf
,
wxWindow
*
p_parent
,
wxGauge
**
pp_volctrl
)
:
wxControl
(
p_parent
,
-
1
,
wxDefaultPosition
,
wxSize
(
64
,
16
),
wxBORDER_NONE
)
:
wxControl
(
p_parent
,
-
1
,
wxDefaultPosition
,
wxSize
(
64
,
VLCVOL_HEIGHT
),
wxBORDER_NONE
),
i_y_offset
((
VLCVOL_HEIGHT
-
TOOLBAR_BMP_HEIGHT
)
/
2
)
{
*
pp_volctrl
=
new
wxVolCtrl
(
p_intf
,
this
,
-
1
,
wxPoint
(
18
,
0
),
wxSize
(
44
,
16
)
);
*
pp_volctrl
=
new
wxVolCtrl
(
p_intf
,
this
,
-
1
,
wxPoint
(
18
,
i_y_offset
),
wxSize
(
44
,
TOOLBAR_BMP_HEIGHT
)
);
}
void
VLCVolCtrl
::
OnPaint
(
wxPaintEvent
&
evt
)
{
wxPaintDC
dc
(
this
);
wxBitmap
mPlayBitmap
(
speaker_xpm
);
dc
.
DrawBitmap
(
mPlayBitmap
,
1
,
0
,
TRUE
);
dc
.
DrawBitmap
(
mPlayBitmap
,
0
,
i_y_offset
,
TRUE
);
}
void
Interface
::
CreateOurToolBar
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment