[vlc-commits] [Git][videolan/vlc][master] 2 commits: qml: remove focus shadow from the play button

Steve Lhomme (@robUx4) gitlab at videolan.org
Tue May 21 06:23:04 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
b2d350d5 by Fatih Uzunoglu at 2024-05-21T05:51:40+00:00
qml: remove focus shadow from the play button

- - - - -
d402227b by Fatih Uzunoglu at 2024-05-21T05:51:40+00:00
qml: show rectangular borders when focused in PlayButton

- - - - -


1 changed file:

- modules/gui/qt/player/qml/controlbarcontrols/PlayButton.qml


Changes:

=====================================
modules/gui/qt/player/qml/controlbarcontrols/PlayButton.qml
=====================================
@@ -69,32 +69,13 @@ T.Control {
 
     states: [
         State {
-            name: "focused"
-            when: visualFocus
-
-            PropertyChanges {
-                target: hoverShadow
-                opacity: 0.0
-            }
-
-            PropertyChanges {
-                target: focusShadow
-                opacity: 1.0
-            }
-        },
-        State {
-            name: "hover"
+            name: "hovered"
             when: cursorInside
 
             PropertyChanges {
                 target: hoverShadow
                 opacity: 1.0
             }
-
-            PropertyChanges {
-                target: focusShadow
-                opacity: 0.0
-            }
         }
     ]
 
@@ -238,7 +219,9 @@ T.Control {
         implicitWidth: height
         implicitHeight: VLCStyle.icon_medium
 
-        component DropShadowImage : Widgets.DropShadowImage {
+        Widgets.DropShadowImage {
+            id: hoverShadow
+
             anchors.centerIn: parent
 
             visible: opacity > 0
@@ -248,10 +231,6 @@ T.Control {
             rectHeight: parent.height
             xRadius: parent.width
             yRadius: xRadius
-        }
-
-        DropShadowImage {
-            id: hoverShadow
 
             blurRadius: VLCStyle.dp(9)
             yOffset: VLCStyle.dp(4)
@@ -259,13 +238,13 @@ T.Control {
             color: theme.accent.alpha(0.29)
         }
 
-        DropShadowImage {
-            id: focusShadow
+        Widgets.AnimatedBackground {
+            anchors.fill: parent
+            anchors.margins: -border.width
 
-            blurRadius: VLCStyle.dp(14)
-            yOffset: VLCStyle.dp(1)
+            enabled: theme.initialized
 
-            color: theme.accent.alpha(1.0)
+            border.color: root.visualFocus ? theme.visualFocus : "transparent"
         }
 
         Rectangle {



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/6e448e9709ad139eb074706b83ab01c7bcccbb84...d402227b9305f9c54aa639db1a6270c3ed8c3a40

-- 
This project does not include diff previews in email notifications.
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/6e448e9709ad139eb074706b83ab01c7bcccbb84...d402227b9305f9c54aa639db1a6270c3ed8c3a40
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list