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
b6438f79
Commit
b6438f79
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: improve the seek slider design with a light 3D effect
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
05aaabeb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
23 deletions
+13
-23
modules/gui/qt4/util/input_slider.cpp
modules/gui/qt4/util/input_slider.cpp
+13
-23
No files found.
modules/gui/qt4/util/input_slider.cpp
View file @
b6438f79
...
@@ -252,29 +252,23 @@ void SeekSlider::paintEvent( QPaintEvent *event )
...
@@ -252,29 +252,23 @@ void SeekSlider::paintEvent( QPaintEvent *event )
barRect
.
moveCenter
(
rect
().
center
()
);
barRect
.
moveCenter
(
rect
().
center
()
);
QColor
backgroundBase
(
135
,
135
,
135
);
QLinearGradient
backgroundGradient
(
0
,
0
,
0
,
height
()
);
QLinearGradient
backgroundGradient
(
0
,
0
,
0
,
height
()
);
backgroundGradient
.
setColorAt
(
0.0
,
QColor
(
126
,
126
,
126
)
);
backgroundGradient
.
setColorAt
(
0.0
,
backgroundBase
);
backgroundGradient
.
setColorAt
(
0.30
,
QColor
(
110
,
110
,
110
)
);
backgroundGradient
.
setColorAt
(
1.0
,
backgroundBase
.
lighter
(
150
)
);
backgroundGradient
.
setColorAt
(
0.31
,
QColor
(
101
,
101
,
101
)
);
backgroundGradient
.
setColorAt
(
1.0
,
QColor
(
86
,
86
,
86
)
);
QColor
foregroundBase
(
50
,
156
,
255
);
QLinearGradient
foregroundGradient
(
0
,
0
,
0
,
height
()
);
QLinearGradient
foregroundGradient
(
0
,
0
,
0
,
height
()
);
foregroundGradient
.
setColorAt
(
0.0
,
QColor
(
26
,
49
,
128
)
);
foregroundGradient
.
setColorAt
(
0.0
,
foregroundBase
);
foregroundGradient
.
setColorAt
(
0.30
,
QColor
(
28
,
77
,
175
)
);
foregroundGradient
.
setColorAt
(
1.0
,
foregroundBase
.
darker
(
140
)
);
foregroundGradient
.
setColorAt
(
0.32
,
QColor
(
32
,
85
,
177
)
);
foregroundGradient
.
setColorAt
(
1.0
,
QColor
(
81
,
50
,
210
)
);
//foregroundGradient.setColorAt( 0.0, palette().color( QPalette::Inactive, QPalette::Mid ) );
painter
.
setPen
(
QColor
(
230
,
230
,
230
)
);
//foregroundGradient.setColorAt( 0.30, palette().color( QPalette::Inactive, QPalette::Light ) );
painter
.
setBrush
(
Qt
::
NoBrush
);
//foregroundGradient.setColorAt( 1.0, palette().color( QPalette::Inactive, QPalette::Midlight ) );
painter
.
drawRoundedRect
(
barRect
.
adjusted
(
0
,
2
,
0
,
0
),
barCorner
,
barCorner
);
//foregroundGradient.setColorAt( 0.0, QColor( 35, 213, 7 ) );
//foregroundGradient.setColorAt( 0.30, QColor( 37, 133, 21 ) );
//foregroundGradient.setColorAt( 1.0, QColor( 81, 215, 55 ) );
painter
.
setPen
(
Qt
::
NoPen
);
painter
.
setPen
(
Qt
::
NoPen
);
painter
.
setBrush
(
backgroundGradient
);
painter
.
setBrush
(
backgroundGradient
);
painter
.
drawRoundedRect
(
barRect
.
adjusted
(
0
,
0
,
0
,
0
)
,
barCorner
,
barCorner
);
painter
.
drawRoundedRect
(
barRect
,
barCorner
,
barCorner
);
switch
(
orientation
()
)
{
switch
(
orientation
()
)
{
case
Qt
:
:
Horizontal
:
case
Qt
:
:
Horizontal
:
...
@@ -287,13 +281,9 @@ void SeekSlider::paintEvent( QPaintEvent *event )
...
@@ -287,13 +281,9 @@ void SeekSlider::paintEvent( QPaintEvent *event )
}
}
if
(
option
.
sliderPosition
>
minimum
()
&&
option
.
sliderPosition
<=
maximum
()
)
{
if
(
option
.
sliderPosition
>
minimum
()
&&
option
.
sliderPosition
<=
maximum
()
)
{
painter
.
setPen
(
Qt
::
black
);
painter
.
setPen
(
Qt
::
NoPen
);
// painter.setBrush( foregroundGradient );
painter
.
setBrush
(
foregroundGradient
);
painter
.
drawRoundedRect
(
barRect
.
adjusted
(
1
,
1
,
-
1
,
0
),
barCorner
,
barCorner
);
QBrush
brush
;
brush
.
setTexture
(
QPixmap
(
":/progress"
)
);
painter
.
setBrush
(
brush
);
painter
.
drawRoundedRect
(
barRect
.
adjusted
(
1
,
1
,
-
1
,
-
1
),
barCorner
,
barCorner
);
}
}
// draw handle
// draw handle
...
...
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