Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
2a526466
Commit
2a526466
authored
Dec 07, 2012
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: allow a maximum volume on the sound slider
Too many users are bitching about this Close #6105
parent
1c42889a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
6 deletions
+12
-6
modules/gui/qt4/components/controller_widget.cpp
modules/gui/qt4/components/controller_widget.cpp
+2
-1
modules/gui/qt4/qt4.cpp
modules/gui/qt4/qt4.cpp
+4
-0
modules/gui/qt4/util/input_slider.cpp
modules/gui/qt4/util/input_slider.cpp
+3
-4
modules/gui/qt4/util/input_slider.hpp
modules/gui/qt4/util/input_slider.hpp
+3
-1
No files found.
modules/gui/qt4/components/controller_widget.cpp
View file @
2a526466
...
...
@@ -89,7 +89,8 @@ SoundWidget::SoundWidget( QWidget *_parent, intf_thread_t * _p_intf,
{
volumeSlider
=
new
SoundSlider
(
this
,
config_GetInt
(
p_intf
,
"volume-step"
),
var_InheritString
(
p_intf
,
"qt-slider-colours"
)
);
var_InheritString
(
p_intf
,
"qt-slider-colours"
),
var_InheritInteger
(
p_intf
,
"qt-max-volume"
)
);
}
else
{
...
...
modules/gui/qt4/qt4.cpp
View file @
2a526466
...
...
@@ -180,6 +180,8 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * );
#define ICONCHANGE_LONGTEXT N_( \
"This option allows the interface to change its icon on various occasions.")
#define VOLUME_MAX_TEXT N_( "Maximum Volume displayed" )
static
const
int
i_notification_list
[]
=
{
NOTIFICATION_NEVER
,
NOTIFICATION_MINIMIZED
,
NOTIFICATION_ALWAYS
};
...
...
@@ -273,6 +275,8 @@ vlc_module_begin ()
add_bool
(
"qt-icon-change"
,
true
,
ICONCHANGE_TEXT
,
ICONCHANGE_LONGTEXT
,
true
)
add_integer_with_range
(
"qt-max-volume"
,
125
,
60
,
300
,
VOLUME_MAX_TEXT
,
VOLUME_MAX_TEXT
,
true
)
add_obsolete_bool
(
"qt-blingbling"
)
/* Suppressed since 1.0.0 */
add_obsolete_integer
(
"qt-display-mode"
)
/* Suppressed since 1.1.0 */
...
...
modules/gui/qt4/util/input_slider.cpp
View file @
2a526466
...
...
@@ -434,15 +434,14 @@ bool SeekSlider::isAnimationRunning() const
#define WLENGTH 80 // px
#define WHEIGHT 22 // px
#define SOUNDMIN 0 // %
#define SOUNDMAX 125 // % (+6dB)
SoundSlider
::
SoundSlider
(
QWidget
*
_parent
,
int
_i_step
,
char
*
psz_colors
)
char
*
psz_colors
,
int
max
)
:
QAbstractSlider
(
_parent
)
{
f_step
=
(
float
)(
_i_step
*
10000
)
/
(
float
)((
SOUNDMAX
-
SOUNDMIN
)
*
AOUT_VOLUME_DEFAULT
);
setRange
(
SOUNDMIN
,
SOUNDMAX
);
/
(
float
)((
max
-
SOUNDMIN
)
*
AOUT_VOLUME_DEFAULT
);
setRange
(
SOUNDMIN
,
max
);
setMouseTracking
(
true
);
isSliding
=
false
;
b_mouseOutside
=
true
;
...
...
modules/gui/qt4/util/input_slider.hpp
View file @
2a526466
...
...
@@ -121,11 +121,13 @@ signals:
/* Sound Slider inherited directly from QAbstractSlider */
class
QPaintEvent
;
#define SOUNDMAX 125 // % (+6dB)
class
SoundSlider
:
public
QAbstractSlider
{
Q_OBJECT
public:
SoundSlider
(
QWidget
*
_parent
,
int
_i_step
,
char
*
);
SoundSlider
(
QWidget
*
_parent
,
int
_i_step
,
char
*
psz_colors
,
int
max
=
SOUNDMAX
);
void
setMuted
(
bool
);
/* Set Mute status */
protected:
...
...
Write
Preview
Markdown
is supported
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