Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
442
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
18f5174c
Commit
18f5174c
authored
3 years ago
by
Fatih Uzunoğlu
Committed by
Hugo Beauzée-Luyssen
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
qml: use DoubleShadow in GridItem and remove obsolete loaders
parent
1b105761
No related branches found
Branches containing commit
No related tags found
1 merge request
!1381
qt/qml: introduce static effect image provider
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/gui/qt/widgets/qml/GridItem.qml
+55
-42
55 additions, 42 deletions
modules/gui/qt/widgets/qml/GridItem.qml
with
55 additions
and
42 deletions
modules/gui/qt/widgets/qml/GridItem.qml
+
55
−
42
View file @
18f5174c
...
...
@@ -20,7 +20,7 @@ import QtQuick.Controls 2.4
import
QtQuick
.
Templates
2.4
as
T
import
QtQuick
.
Layouts
1.11
import
QtQml
.
Models
2.2
import
QtGraphicalEffects
1.0
import
org
.
videolan
.
vlc
0.1
import
"
qrc:///widgets/
"
as
Widgets
...
...
@@ -60,8 +60,9 @@ T.Control {
property
alias
playIconSize
:
picture
.
playIconSize
property
alias
pictureRadius
:
picture
.
radius
property
alias
pictureOverlay
:
picture
.
imageOverlay
property
alias
unselectedUnderlay
:
unselectedUnderlayLoader
.
sourceComponent
property
alias
selectedUnderlay
:
selectedUnderlayLoader
.
sourceComponent
property
alias
selectedShadow
:
selectedShadow
property
alias
unselectedShadow
:
unselectedShadow
// Signals
...
...
@@ -89,15 +90,13 @@ T.Control {
when
:
highlighted
PropertyChanges
{
target
:
selectedUnderlayLoader
opacity
:
1
visible
:
true
target
:
selectedShadow
opacity
:
1.0
}
PropertyChanges
{
target
:
unselected
UnderlayLoader
target
:
unselected
Shadow
opacity
:
0
visible
:
false
}
PropertyChanges
{
...
...
@@ -117,8 +116,8 @@ T.Control {
SequentialAnimation
{
PropertyAction
{
target
s
:
[
picture
,
selectedUnderlayLoader
]
properties
:
"
visible,
playCoverVisible
"
target
:
picture
properties
:
"
playCoverVisible
"
}
NumberAnimation
{
...
...
@@ -126,11 +125,6 @@ T.Control {
duration
:
VLCStyle
.
duration_long
easing.type
:
Easing
.
InSine
}
PropertyAction
{
target
:
unselectedUnderlayLoader
property
:
"
visible
"
}
}
},
...
...
@@ -140,8 +134,8 @@ T.Control {
SequentialAnimation
{
PropertyAction
{
target
:
unselectedUnderlayLoader
property
:
"
visible,
playCoverVisible
"
target
:
picture
property
:
"
playCoverVisible
"
}
NumberAnimation
{
...
...
@@ -149,11 +143,6 @@ T.Control {
duration
:
VLCStyle
.
duration_long
easing.type
:
Easing
.
OutSine
}
PropertyAction
{
targets
:
[
picture
,
selectedUnderlayLoader
]
properties
:
"
visible
"
}
}
}
]
...
...
@@ -226,26 +215,6 @@ T.Control {
root
.
dragItem
.
Drag
.
active
=
drag
.
active
}
Loader
{
id
:
unselectedUnderlayLoader
asynchronous
:
true
}
Loader
{
id
:
selectedUnderlayLoader
asynchronous
:
true
active
:
false
visible
:
false
opacity
:
0
onVisibleChanged
:
{
if
(
visible
&&
!
active
)
active
=
true
}
}
ColumnLayout
{
id
:
layout
...
...
@@ -264,6 +233,50 @@ T.Control {
Layout.preferredHeight
:
pictureHeight
onPlayIconClicked
:
root
.
playClicked
()
DoubleShadow
{
id
:
unselectedShadow
anchors.fill
:
parent
anchors.margins
:
VLCStyle
.
dp
(
1
)
// outside border (unselected)
z
:
-
1
opacity
:
0.62
visible
:
opacity
>
0
xRadius
:
parent
.
radius
yRadius
:
parent
.
radius
primaryColor
:
Qt
.
rgba
(
0
,
0
,
0
,
.
18
)
primaryVerticalOffset
:
VLCStyle
.
dp
(
1
,
VLCStyle
.
scale
)
primaryBlurRadius
:
VLCStyle
.
dp
(
3
,
VLCStyle
.
scale
)
secondaryColor
:
Qt
.
rgba
(
0
,
0
,
0
,
.
22
)
secondaryVerticalOffset
:
VLCStyle
.
dp
(
6
,
VLCStyle
.
scale
)
secondaryBlurRadius
:
VLCStyle
.
dp
(
14
,
VLCStyle
.
scale
)
}
DoubleShadow
{
id
:
selectedShadow
anchors.fill
:
parent
anchors.margins
:
VLCStyle
.
dp
()
z
:
-
1
visible
:
opacity
>
0
opacity
:
0
xRadius
:
parent
.
radius
yRadius
:
parent
.
radius
primaryColor
:
Qt
.
rgba
(
0
,
0
,
0
,
.
18
)
primaryVerticalOffset
:
VLCStyle
.
dp
(
6
,
VLCStyle
.
scale
)
primaryBlurRadius
:
VLCStyle
.
dp
(
18
,
VLCStyle
.
scale
)
secondaryColor
:
Qt
.
rgba
(
0
,
0
,
0
,
.
22
)
secondaryVerticalOffset
:
VLCStyle
.
dp
(
32
,
VLCStyle
.
scale
)
secondaryBlurRadius
:
VLCStyle
.
dp
(
72
,
VLCStyle
.
scale
)
}
}
Widgets.ScrollingText
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment