Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
8a99e94b
Commit
8a99e94b
authored
Sep 08, 2007
by
Jean-Baptiste Kempf
Browse files
Qt4 - Volume: if volume > 50% of the sliderBar, then show the highVolume Label.
parent
b399b131
Changes
3
Hide whitespace changes
Inline
Side-by-side
modules/gui/qt4/components/interface_widgets.cpp
View file @
8a99e94b
...
...
@@ -462,18 +462,18 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i, bool b_advControls ) :
prefs
()
);
setupSmallButton
(
prefsButton
);
controlLayout
->
addWidget
(
prefsButton
,
3
,
13
);
controlLayout
->
setColumnStretch
(
14
,
5
);
/* Volume */
VolumeClickHandler
*
h
=
new
VolumeClickHandler
(
p_intf
,
this
);
QLabel
*
volMuteLabel
=
new
QLabel
;
volMuteLabel
=
new
QLabel
;
volMuteLabel
->
setPixmap
(
QPixmap
(
":/pixmaps/volume-low.png"
)
);
volMuteLabel
->
setToolTip
(
qtr
(
"Mute"
)
);
volMuteLabel
->
installEventFilter
(
h
);
/** TODO:
/** TODO:
* Change this slider to use a nice Amarok-like one
* Add a Context menu to change to the most useful %
* **/
...
...
@@ -553,13 +553,16 @@ void ControlsWidget::setNavigation( int navigation )
}
static
bool
b_my_volume
;
void
ControlsWidget
::
updateVolume
(
int
sliderVolume
)
void
ControlsWidget
::
updateVolume
(
int
i_
sliderVolume
)
{
if
(
!
b_my_volume
)
{
int
i_res
=
sliderVolume
*
AOUT_VOLUME_MAX
/
int
i_res
=
i_
sliderVolume
*
AOUT_VOLUME_MAX
/
(
2
*
volumeSlider
->
maximum
()
);
aout_VolumeSet
(
p_intf
,
i_res
);
if
(
i_sliderVolume
<
volumeSlider
->
maximum
()
/
2
)
volMuteLabel
->
setPixmap
(
QPixmap
(
":/pixmaps/volume-low.png"
)
);
else
volMuteLabel
->
setPixmap
(
QPixmap
(
":/pixmaps/volume-high.png"
)
);
}
}
...
...
modules/gui/qt4/components/interface_widgets.hpp
View file @
8a99e94b
...
...
@@ -155,6 +155,7 @@ private:
QPushButton
*
playButton
,
*
fullscreenButton
;
QPushButton
*
slowerButton
,
*
fasterButton
;
AdvControlsWidget
*
advControls
;
QLabel
*
volMuteLabel
;
bool
b_advancedVisible
;
private
slots
:
...
...
modules/gui/qt4/main_interface.cpp
View file @
8a99e94b
...
...
@@ -650,7 +650,7 @@ void MainInterface::toggleAdvanced()
int
MainInterface
::
getControlsVisibilityStatus
()
{
return
(
(
controls
->
isVisible
()
?
0x2
:
0x0
)
return
(
(
controls
->
isVisible
()
?
0x2
:
0x0
)
+
controls
->
b_advancedVisible
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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