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
454
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
3aa63b60
Commit
3aa63b60
authored
4 years ago
by
Fatih Uzunoğlu
Committed by
Pierre Lamot
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
qml: fix SortControl background effect rendering
Signed-off-by:
Pierre Lamot
<
pierre@videolabs.io
>
parent
dc8f9ff0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/gui/qt/widgets/qml/SortControl.qml
+32
-32
32 additions, 32 deletions
modules/gui/qt/widgets/qml/SortControl.qml
with
32 additions
and
32 deletions
modules/gui/qt/widgets/qml/SortControl.qml
+
32
−
32
View file @
3aa63b60
...
...
@@ -104,8 +104,6 @@ Widgets.NavigableFocusScope {
padding
:
1
onOpened
:
{
updateBgRect
()
button
.
KeyNavigation
.
down
=
list
button
.
highlighted
=
true
...
...
@@ -228,58 +226,60 @@ Widgets.NavigableFocusScope {
}
}
function
updateBgRect
()
{
glassEffect
.
popupGlobalPos
=
g_root
.
mapFromItem
(
root
,
popup
.
x
,
popup
.
y
)
}
background
:
Rectangle
{
border.width
:
VLCStyle
.
dp
(
1
)
border.color
:
colors
.
accent
Widgets.FrostedGlassEffect
{
id
:
glassEffect
source
:
g_root
Loader
{
id
:
effectLoader
anchors.fill
:
parent
anchors.margins
:
VLCStyle
.
dp
(
1
)
property
point
popupGlobalPos
sourceRect
:
Qt
.
rect
(
popupGlobalPos
.
x
,
popupGlobalPos
.
y
,
glassEffect
.
width
,
glassEffect
.
height
)
asynchronous
:
true
tint
:
colors
.
bg
tintStrength
:
0.3
}
}
Component
{
id
:
frostedGlassEffect
Connections
{
target
:
g_root
Widgets.FrostedGlassEffect
{
source
:
g_root
enabled
:
popup
.
visible
// since Popup is not an Item, we can not directly map its position
// to the source item. Instead, we can use root because popup's
// position is relative to its position.
// This method unfortunately causes issues when source item is resized.
// But in that case, we reload the effectLoader to redraw the effect.
property
point
popupMappedPos
:
g_root
.
mapFromItem
(
root
,
popup
.
x
,
popup
.
y
)
sourceRect
:
Qt
.
rect
(
popupMappedPos
.
x
,
popupMappedPos
.
y
,
width
,
height
)
onWidthChanged
:
{
popup
.
updateBgRect
()
}
tint
:
colors
.
bg
tintStrength
:
0.3
}
}
onHeightChanged
:
{
popup
.
updateBgRect
()
sourceComponent
:
frostedGlassEffect
function
reload
()
{
if
(
status
!=
Loader
.
Ready
)
return
sourceComponent
=
undefined
sourceComponent
=
frostedGlassEffect
}
}
}
Connections
{
target
:
mainInterface
target
:
g_root
enabled
:
popup
.
visible
on
IntfScaleFactor
Changed
:
{
popup
.
updateBgRect
()
on
Width
Changed
:
{
effectLoader
.
reload
()
}
}
Connections
{
target
:
playlistColumn
on
Width
Changed
:
{
popup
.
updateBgRect
()
on
Height
Changed
:
{
effectLoader
.
reload
()
}
}
}
...
...
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