[vlc-commits] [Git][videolan/vlc][master] 5 commits: qml: do not pixel align DoubleShadow

Steve Lhomme (@robUx4) gitlab at videolan.org
Wed Jan 3 16:20:06 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
f188e3ee by Fatih Uzunoglu at 2024-01-03T16:05:26+00:00
qml: do not pixel align DoubleShadow

- - - - -
2774ad5e by Fatih Uzunoglu at 2024-01-03T16:05:26+00:00
qml: add missing xRadius and yRadius setting

- - - - -
59bbf90a by Fatih Uzunoglu at 2024-01-03T16:05:26+00:00
qml: rename ListCoverShadow to DefaultShadow

- - - - -
ec77208f by Fatih Uzunoglu at 2024-01-03T16:05:26+00:00
qml: use DefaultShadow in more places

- - - - -
bde20014 by Fatih Uzunoglu at 2024-01-03T16:05:26+00:00
qml: set opacity in DefaultShadow

... and use the default `z` and `opacity` value

- - - - -


13 changed files:

- modules/gui/qt/Makefile.am
- modules/gui/qt/medialibrary/qml/MusicAlbumsGridExpandDelegate.qml
- modules/gui/qt/medialibrary/qml/VideoInfoExpandPanel.qml
- modules/gui/qt/network/qml/NetworkThumbnailItem.qml
- modules/gui/qt/player/qml/controlbarcontrols/ArtworkInfoWidget.qml
- modules/gui/qt/playlist/qml/PlaylistDelegate.qml
- modules/gui/qt/vlc.qrc
- modules/gui/qt/widgets/qml/ListCoverShadow.qml → modules/gui/qt/widgets/qml/DefaultShadow.qml
- modules/gui/qt/widgets/qml/DoubleShadow.qml
- modules/gui/qt/widgets/qml/DragItem.qml
- modules/gui/qt/widgets/qml/EmptyLabel.qml
- modules/gui/qt/widgets/qml/GridItem.qml
- modules/gui/qt/widgets/qml/TableColumns.qml


Changes:

=====================================
modules/gui/qt/Makefile.am
=====================================
@@ -1036,7 +1036,7 @@ libqt_plugin_la_QML = \
 	widgets/qml/KeyNavigableListView.qml \
 	widgets/qml/KeyNavigableTableView.qml \
 	widgets/qml/TableViewDelegate.qml \
-	widgets/qml/ListCoverShadow.qml \
+	widgets/qml/DefaultShadow.qml \
 	widgets/qml/ListLabel.qml \
 	widgets/qml/LocalTabBar.qml \
 	widgets/qml/MediaCover.qml \


=====================================
modules/gui/qt/medialibrary/qml/MusicAlbumsGridExpandDelegate.qml
=====================================
@@ -127,9 +127,12 @@ FocusScope {
                     ?  root.model.cover
                     : VLCStyle.noArtAlbumCover
 
-                Widgets.ListCoverShadow {
+                Widgets.DefaultShadow {
                     anchors.fill: parent
                     visible: (parent.status === RoundImage.Ready)
+
+                    xRadius: parent.radius
+                    yRadius: parent.radius
                 }
             }
         }


=====================================
modules/gui/qt/medialibrary/qml/VideoInfoExpandPanel.qml
=====================================
@@ -117,10 +117,12 @@ FocusScope {
                             source: model.thumbnail || VLCStyle.noArtVideoCover
                             radius: VLCStyle.gridCover_radius
 
-                            Widgets.ListCoverShadow {
+                            Widgets.DefaultShadow {
                                 anchors.fill: parent
-                                z: -1
                                 visible: (parent.status === RoundImage.Ready)
+
+                                xRadius: parent.radius
+                                yRadius: parent.radius
                             }
                         }
                     }


=====================================
modules/gui/qt/network/qml/NetworkThumbnailItem.qml
=====================================
@@ -101,7 +101,7 @@ Row {
         width: artwork.width
         height: artwork.height
 
-        Widgets.ListCoverShadow {
+        Widgets.DefaultShadow {
             // clip shadows to only the painted area of cover
             x: (artwork.x + artwork.width - artwork.paintedWidth) / 2
             y: (artwork.y + artwork.height - artwork.paintedHeight) / 2


=====================================
modules/gui/qt/player/qml/controlbarcontrols/ArtworkInfoWidget.qml
=====================================
@@ -124,20 +124,11 @@ AbstractButton {
                                                 .arg(artistLabel.text)
                                                 .arg(progressIndicator.text)
 
-            Widgets.DoubleShadow {
+            Widgets.DefaultShadow {
                 anchors.centerIn: coverImage
-                anchors.alignWhenCentered: false
 
-                implicitWidth: coverImage.paintedWidth
-                implicitHeight: coverImage.paintedHeight
-
-                z: -1
-
-                primaryBlurRadius: VLCStyle.dp(3, VLCStyle.scale)
-                primaryVerticalOffset: VLCStyle.dp(1, VLCStyle.scale)
-
-                secondaryBlurRadius: VLCStyle.dp(14, VLCStyle.scale)
-                secondaryVerticalOffset: VLCStyle.dp(6, VLCStyle.scale)
+                width: coverImage.paintedWidth
+                height: coverImage.paintedHeight
             }
         }
 


=====================================
modules/gui/qt/playlist/qml/PlaylistDelegate.qml
=====================================
@@ -168,19 +168,11 @@ T.ItemDelegate {
                 visible: !statusIcon.visible
                 asynchronous: true
 
-                Widgets.DoubleShadow {
+                Widgets.DefaultShadow {
                     anchors.centerIn: parent
                     width: parent.paintedWidth
                     height: parent.paintedHeight
                     visible: (artwork.status === Image.Ready)
-
-                    z: -1
-
-                    primaryBlurRadius: VLCStyle.dp(3)
-                    primaryVerticalOffset: VLCStyle.dp(1)
-
-                    secondaryBlurRadius: VLCStyle.dp(14)
-                    secondaryVerticalOffset: VLCStyle.dp(6)
                 }
             }
 


=====================================
modules/gui/qt/vlc.qrc
=====================================
@@ -213,7 +213,7 @@
         <file alias="IconButton.qml">widgets/qml/IconButton.qml</file>
         <file alias="DragItem.qml">widgets/qml/DragItem.qml</file>
         <file alias="CoverShadow.qml">widgets/qml/CoverShadow.qml</file>
-        <file alias="ListCoverShadow.qml">widgets/qml/ListCoverShadow.qml</file>
+        <file alias="DefaultShadow.qml">widgets/qml/DefaultShadow.qml</file>
         <file alias="OverlayMenu.qml">widgets/qml/OverlayMenu.qml</file>
         <file alias="IconControlButton.qml">widgets/qml/IconControlButton.qml</file>
         <file alias="ToolTipExt.qml">widgets/qml/ToolTipExt.qml</file>


=====================================
modules/gui/qt/widgets/qml/ListCoverShadow.qml → modules/gui/qt/widgets/qml/DefaultShadow.qml
=====================================
@@ -24,11 +24,13 @@ import "qrc:///style/"
 DoubleShadow {
     id: root
 
-    primaryVerticalOffset: VLCStyle.dp(6, VLCStyle.scale)
-    primaryBlurRadius: VLCStyle.dp(14, VLCStyle.scale)
+    opacity: 0.62
 
-    secondaryVerticalOffset: VLCStyle.dp(1, VLCStyle.scale)
-    secondaryBlurRadius: VLCStyle.dp(3, VLCStyle.scale)
+    primaryVerticalOffset: VLCStyle.dp(1, VLCStyle.scale)
+    primaryBlurRadius: VLCStyle.dp(3, VLCStyle.scale)
+
+    secondaryVerticalOffset: VLCStyle.dp(6, VLCStyle.scale)
+    secondaryBlurRadius: VLCStyle.dp(14, VLCStyle.scale)
 
     z: -1
 }


=====================================
modules/gui/qt/widgets/qml/DoubleShadow.qml
=====================================
@@ -50,6 +50,7 @@ Item {
         id: primaryShadow
 
         anchors.centerIn: parent
+        anchors.alignWhenCentered: false
 
         color: Qt.rgba(0, 0, 0, .18)
         xOffset: 0
@@ -64,6 +65,7 @@ Item {
         id: secondaryShadow
 
         anchors.centerIn: parent
+        anchors.alignWhenCentered: false
 
         color: Qt.rgba(0, 0, 0, .22)
         xOffset: 0


=====================================
modules/gui/qt/widgets/qml/DragItem.qml
=====================================
@@ -409,21 +409,11 @@ Item {
                 anchors.fill: parent
                 color: theme.bg.primary
 
-                DoubleShadow {
+                DefaultShadow {
                     anchors.fill: parent
 
-                    z: -1
-
                     xRadius: bg.radius
                     yRadius: bg.radius
-
-                    primaryBlurRadius: VLCStyle.dp(3)
-                    primaryVerticalOffset: VLCStyle.dp(1, VLCStyle.scale)
-                    primaryHorizontalOffset: 0
-
-                    secondaryBlurRadius: VLCStyle.dp(14)
-                    secondaryVerticalOffset: VLCStyle.dp(6, VLCStyle.scale)
-                    secondaryHorizontalOffset: 0
                 }
             }
 
@@ -502,19 +492,11 @@ Item {
             text: "+" + (dragItem._indexesSize - dragItem._maxCovers)
         }
 
-        DoubleShadow {
-            z: -1
+        DefaultShadow {
             anchors.fill: parent
+
             xRadius: extraCovers.radius
             yRadius: extraCovers.radius
-
-            primaryBlurRadius: VLCStyle.dp(3)
-            primaryVerticalOffset: VLCStyle.dp(1, VLCStyle.scale)
-            primaryHorizontalOffset: 0
-
-            secondaryBlurRadius: VLCStyle.dp(14)
-            secondaryVerticalOffset: VLCStyle.dp(6, VLCStyle.scale)
-            secondaryHorizontalOffset: 0
         }
     }
 


=====================================
modules/gui/qt/widgets/qml/EmptyLabel.qml
=====================================
@@ -84,7 +84,7 @@ T.Control {
                     fillMode: Image.PreserveAspectFit
                 }
 
-                Widgets.ListCoverShadow {
+                Widgets.DefaultShadow {
                     anchors.fill: cover
                 }
             }


=====================================
modules/gui/qt/widgets/qml/GridItem.qml
=====================================
@@ -259,24 +259,16 @@ T.ItemDelegate {
                     root.playClicked()
                 }
 
-                DoubleShadow {
+                DefaultShadow {
                     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
-
-                    primaryVerticalOffset: VLCStyle.dp(1, VLCStyle.scale)
-                    primaryBlurRadius: VLCStyle.dp(3, VLCStyle.scale)
-
-                    secondaryVerticalOffset: VLCStyle.dp(6, VLCStyle.scale)
-                    secondaryBlurRadius: VLCStyle.dp(14, VLCStyle.scale)
                 }
 
                 DoubleShadow {


=====================================
modules/gui/qt/widgets/qml/TableColumns.qml
=====================================
@@ -138,9 +138,11 @@ Item {
                 }
             }
 
-            ListCoverShadow {
+            DefaultShadow {
                 anchors.fill: parent
-                z: -1
+
+                xRadius: parent.radius
+                yRadius: parent.radius
             }
         }
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/79a4029d730169feacb304c904a5a5d50fd39100...bde20014c2470309507a567d9b7702e8896f076a

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/79a4029d730169feacb304c904a5a5d50fd39100...bde20014c2470309507a567d9b7702e8896f076a
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