Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
e50346b1
Commit
e50346b1
authored
Apr 15, 2011
by
Ludovic Fauvet
Committed by
Jean-Baptiste Kempf
Apr 16, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4: change the handle size and color
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
b6438f79
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
modules/gui/qt4/util/input_slider.cpp
modules/gui/qt4/util/input_slider.cpp
+10
-10
No files found.
modules/gui/qt4/util/input_slider.cpp
View file @
e50346b1
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
#include <QStyleOptionSlider>
#include <QStyleOptionSlider>
#include <QLinearGradient>
#include <QLinearGradient>
#include <QTimer>
#include <QTimer>
#include <QRadialGradient>
#define MINIMUM 0
#define MINIMUM 0
#define MAXIMUM 1000
#define MAXIMUM 1000
...
@@ -288,32 +289,31 @@ void SeekSlider::paintEvent( QPaintEvent *event )
...
@@ -288,32 +289,31 @@ void SeekSlider::paintEvent( QPaintEvent *event )
// draw handle
// draw handle
if
(
option
.
state
&
QStyle
::
State_MouseOver
)
{
if
(
option
.
state
&
QStyle
::
State_MouseOver
)
{
QLinearGradient
buttonGradient
(
0
,
0
,
0
,
height
()
);
buttonGradient
.
setColorAt
(
0.0
,
QColor
(
1
,
92
,
195
)
);
buttonGradient
.
setColorAt
(
0.40
,
QColor
(
41
,
80
,
124
)
);
buttonGradient
.
setColorAt
(
1.0
,
QColor
(
1
,
92
,
195
)
);
painter
.
setPen
(
QPen
(
Qt
::
blue
)
);
painter
.
setBrush
(
buttonGradient
);
if
(
sliderPos
!=
-
1
)
{
if
(
sliderPos
!=
-
1
)
{
const
int
margin
=
5
;
const
int
margin
=
5
;
QSize
hs
=
handleSize
()
-
QSize
(
2
,
2
);
QSize
hs
=
handleSize
()
-
QSize
(
5
,
5
);
QPoint
pos
;
QPoint
pos
;
switch
(
orientation
()
)
{
switch
(
orientation
()
)
{
case
Qt
:
:
Horizontal
:
case
Qt
:
:
Horizontal
:
pos
=
QPoint
(
sliderPos
-
(
h
andleSize
().
width
()
/
2
),
1
);
pos
=
QPoint
(
sliderPos
-
(
h
s
.
width
()
/
2
),
2
);
pos
.
rx
()
=
qMax
(
margin
,
pos
.
x
()
);
pos
.
rx
()
=
qMax
(
margin
,
pos
.
x
()
);
pos
.
rx
()
=
qMin
(
width
()
-
hs
.
width
()
-
margin
,
pos
.
x
()
);
pos
.
rx
()
=
qMin
(
width
()
-
hs
.
width
()
-
margin
,
pos
.
x
()
);
break
;
break
;
case
Qt
:
:
Vertical
:
case
Qt
:
:
Vertical
:
pos
=
QPoint
(
1
,
height
()
-
(
sliderPos
+
(
handleSize
()
.
height
()
/
2
)
)
);
pos
=
QPoint
(
2
,
height
()
-
(
sliderPos
+
(
hs
.
height
()
/
2
)
)
);
pos
.
ry
()
=
qMax
(
margin
,
pos
.
y
()
);
pos
.
ry
()
=
qMax
(
margin
,
pos
.
y
()
);
pos
.
ry
()
=
qMin
(
height
()
-
hs
.
height
()
-
margin
,
pos
.
y
()
);
pos
.
ry
()
=
qMin
(
height
()
-
hs
.
height
()
-
margin
,
pos
.
y
()
);
break
;
break
;
}
}
QRadialGradient
buttonGradient
(
pos
.
x
()
+
(
hs
.
width
()
/
2
)
-
2
,
pos
.
y
()
+
(
hs
.
height
()
/
2
)
-
2
,
qMax
(
hs
.
width
(),
hs
.
height
()
)
);
buttonGradient
.
setColorAt
(
0.0
,
QColor
(
0
,
0
,
0
)
);
buttonGradient
.
setColorAt
(
1.0
,
QColor
(
80
,
80
,
80
)
);
painter
.
setPen
(
Qt
::
NoPen
);
painter
.
setBrush
(
buttonGradient
);
painter
.
drawEllipse
(
pos
.
x
(),
pos
.
y
(),
hs
.
width
(),
hs
.
height
()
);
painter
.
drawEllipse
(
pos
.
x
(),
pos
.
y
(),
hs
.
width
(),
hs
.
height
()
);
}
}
}
}
...
...
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