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
11a75f69
Commit
11a75f69
authored
Feb 07, 2009
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: simplification of the special volume slider. Any click will show it.
parent
74d2582a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
modules/gui/qt4/components/controller_widget.cpp
modules/gui/qt4/components/controller_widget.cpp
+13
-9
No files found.
modules/gui/qt4/components/controller_widget.cpp
View file @
11a75f69
...
...
@@ -37,6 +37,7 @@
#include <QSpinBox>
#include <QMenu>
#include <QWidgetAction>
#include <QMouseEvent>
SoundWidget
::
SoundWidget
(
QWidget
*
_parent
,
intf_thread_t
*
_p_intf
,
bool
b_shiny
,
bool
b_special
)
...
...
@@ -66,7 +67,7 @@ SoundWidget::SoundWidget( QWidget *_parent, intf_thread_t * _p_intf,
/* Special view, click on button shows the slider */
b_shiny
=
false
;
setContextMenuPolicy
(
Qt
::
CustomContextMenu
);
volMuteLabel
->
installEventFilter
(
this
);
QFrame
*
volumeControlWidget
=
new
QFrame
;
subLayout
=
new
QVBoxLayout
(
volumeControlWidget
);
...
...
@@ -77,11 +78,6 @@ SoundWidget::SoundWidget( QWidget *_parent, intf_thread_t * _p_intf,
widgetAction
->
setDefaultWidget
(
volumeControlWidget
);
volumeMenu
->
addAction
(
widgetAction
);
/* Speed Label behaviour:
- right click gives the vertical speed slider */
CONNECT
(
this
,
customContextMenuRequested
(
QPoint
),
this
,
showVolumeMenu
(
QPoint
)
);
}
/* And add the label */
...
...
@@ -138,9 +134,17 @@ bool SoundWidget::eventFilter( QObject *obj, QEvent *e )
VLC_UNUSED
(
obj
);
if
(
e
->
type
()
==
QEvent
::
MouseButtonPress
)
{
aout_VolumeMute
(
p_intf
,
NULL
);
audio_volume_t
i_volume
;
aout_VolumeGet
(
p_intf
,
&
i_volume
);
if
(
volumeSlider
->
orientation
()
==
Qt
::
Vertical
)
{
QMouseEvent
*
event
=
static_cast
<
QMouseEvent
*>
(
e
);
showVolumeMenu
(
event
->
pos
()
);
}
else
{
aout_VolumeMute
(
p_intf
,
NULL
);
audio_volume_t
i_volume
;
aout_VolumeGet
(
p_intf
,
&
i_volume
);
}
e
->
accept
();
return
true
;
}
...
...
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