Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
e447803e
Commit
e447803e
authored
Apr 06, 2008
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a preference option to choose your Volume Slider colours.
parent
62e3395b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
7 deletions
+26
-7
modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/components/interface_widgets.cpp
+2
-1
modules/gui/qt4/qt4.cpp
modules/gui/qt4/qt4.cpp
+8
-0
modules/gui/qt4/util/input_slider.cpp
modules/gui/qt4/util/input_slider.cpp
+15
-5
modules/gui/qt4/util/input_slider.hpp
modules/gui/qt4/util/input_slider.hpp
+1
-1
No files found.
modules/gui/qt4/components/interface_widgets.cpp
View file @
e447803e
...
...
@@ -603,7 +603,8 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
{
volumeSlider
=
new
SoundSlider
(
this
,
config_GetInt
(
p_intf
,
"volume-step"
),
config_GetInt
(
p_intf
,
"qt-volume-complete"
)
);
config_GetInt
(
p_intf
,
"qt-volume-complete"
),
config_GetPsz
(
p_intf
,
"qt-slider-colours"
)
);
}
else
{
...
...
modules/gui/qt4/qt4.cpp
View file @
e447803e
...
...
@@ -111,6 +111,11 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * );
#define PRIVACY_TEXT N_( "Ask for network policy at start" )
#define SLIDERCOL_TEXT N_( "Define the colours of the volume slider " )
#define SLIDERCOL_LONGTEXT N_( "Define the colours of the volume slider\n " \
"By specifying the 12 numbers separated by a ';'\n " \
"Default is '255;255;255;20;226;20;255;176;15,235;30;20'\n " \
"An alternative can be '30;30;50;40;40;100;50;50;160;150;150;255' ")
#define VIEWDETAIL_TEXT N_( "Show the opening dialog view in detail mode" )
...
...
@@ -184,6 +189,9 @@ vlc_module_begin();
add_integer
(
"qt-updates-days"
,
14
,
NULL
,
UPDATER_DAYS_TEXT
,
UPDATER_DAYS_TEXT
,
VLC_FALSE
);
#endif
add_string
(
"qt-slider-colours"
,
"255;255;255;20;226;20;255;176;15,235;30;20"
,
NULL
,
SLIDERCOL_TEXT
,
SLIDERCOL_LONGTEXT
,
VLC_FALSE
);
add_bool
(
"qt-open-detail"
,
VLC_FALSE
,
NULL
,
VIEWDETAIL_TEXT
,
VIEWDETAIL_TEXT
,
VLC_FALSE
);
...
...
modules/gui/qt4/util/input_slider.cpp
View file @
e447803e
...
...
@@ -114,7 +114,8 @@ void InputSlider::mouseMoveEvent(QMouseEvent *event)
#define SOUNDMIN 0 // %
#define SOUNDMAX 200 // % OR 400 ?
SoundSlider
::
SoundSlider
(
QWidget
*
_parent
,
int
_i_step
,
bool
b_hard
)
SoundSlider
::
SoundSlider
(
QWidget
*
_parent
,
int
_i_step
,
bool
b_hard
,
char
*
psz_colors
)
:
QAbstractSlider
(
_parent
)
{
paddingL
=
5
;
...
...
@@ -134,11 +135,20 @@ SoundSlider::SoundSlider( QWidget *_parent, int _i_step, bool b_hard )
pixGradient
=
QPixmap
(
mask
.
size
()
);
/* Gradient building from the preferences */
QLinearGradient
gradient
(
paddingL
,
4
,
WLENGTH
+
paddingL
,
4
);
gradient
.
setColorAt
(
0.0
,
QColor
(
255
,
255
,
255
)
);
gradient
.
setColorAt
(
0.2
,
QColor
(
20
,
226
,
20
)
);
gradient
.
setColorAt
(
0.5
,
QColor
(
255
,
176
,
15
)
);
gradient
.
setColorAt
(
1.0
,
QColor
(
235
,
30
,
20
)
);
QStringList
colorList
=
qfu
(
psz_colors
).
split
(
";"
);
/* Fill with 255 if the list is too short */
if
(
colorList
.
size
()
<
12
)
for
(
int
i
=
colorList
.
size
();
i
<
12
;
i
++
)
colorList
.
append
(
"255"
);
#define c(i) colorList.at(i).toInt()
gradient
.
setColorAt
(
0.0
,
QColor
(
c
(
0
),
c
(
1
),
c
(
2
)
)
);
gradient
.
setColorAt
(
0.2
,
QColor
(
c
(
3
),
c
(
4
),
c
(
5
)
)
);
gradient
.
setColorAt
(
0.5
,
QColor
(
c
(
6
),
c
(
7
),
c
(
8
)
)
);
gradient
.
setColorAt
(
1.0
,
QColor
(
c
(
9
),
c
(
10
),
c
(
11
)
)
);
QPainter
painter
(
&
pixGradient
);
painter
.
setPen
(
Qt
::
NoPen
);
...
...
modules/gui/qt4/util/input_slider.hpp
View file @
e447803e
...
...
@@ -60,7 +60,7 @@ class SoundSlider : public QAbstractSlider
{
Q_OBJECT
public:
SoundSlider
(
QWidget
*
_parent
,
int
_i_step
,
bool
b_softamp
);
SoundSlider
(
QWidget
*
_parent
,
int
_i_step
,
bool
b_softamp
,
char
*
);
virtual
~
SoundSlider
()
{};
protected:
int
paddingL
;
...
...
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