[vlc-commits] [Git][videolan/vlc][master] 2 commits: qt: reduce playlist delegate vertical padding

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Sun Oct 27 05:52:17 UTC 2024



Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
a6f78e7e by Fatih Uzunoglu at 2024-10-27T05:16:19+00:00
qt: reduce playlist delegate vertical padding

Although having excessive padding makes it possible
to interact with the delegate using touch control
easier, it also causes the playlist to show less
items at once.

VLC is primarily a desktop application, although
we should care about touch support, we should not
optimize the design for touch.

Reducing the vertical padding from 6dp to 2dp seems
to be good compromise. It is still very much possible
to use touch, but also looks okay for a desktop
application.

- - - - -
1271d51e by Fatih Uzunoglu at 2024-10-27T05:16:19+00:00
qml: do not align playlist delegate texts to the image

Commit 21b64442 added spacing here, even though the texts
should be aligned to the image. This broke layouting.

Now that we deviate from the design by reducing the spacing
between items, we can properly use spacing here without
aligning the texts to the image.

- - - - -


2 changed files:

- modules/gui/qt/playlist/qml/PlaylistDelegate.qml
- modules/gui/qt/style/VLCStyle.qml


Changes:

=====================================
modules/gui/qt/playlist/qml/PlaylistDelegate.qml
=====================================
@@ -64,7 +64,7 @@ T.Control {
 
     hoverEnabled: true
 
-    verticalPadding: VLCStyle.playlistDelegate_verticalPadding
+    verticalPadding: VLCStyle.margin_xxxsmall
 
     leftPadding: VLCStyle.margin_normal
 
@@ -200,29 +200,25 @@ T.Control {
             Layout.fillWidth: true
             Layout.fillHeight: true
             Layout.leftMargin: VLCStyle.margin_large
-            spacing: VLCStyle.margin_xsmall
+            spacing: VLCStyle.margin_xxxsmall
 
             Widgets.ListLabel {
                 id: textInfo
 
-                Layout.fillHeight: true
                 Layout.fillWidth: true
 
                 font.weight: model.isCurrent ? Font.Bold : Font.DemiBold
                 text: model.title
                 color: theme.fg.primary
-                verticalAlignment: Text.AlignTop
             }
 
             Widgets.ListSubtitleLabel {
                 id: textArtist
 
-                Layout.fillHeight: true
                 Layout.fillWidth: true
 
                 text: model.artist || qsTr("Unknown Artist")
                 color: theme.fg.primary
-                verticalAlignment: Text.AlignBottom
             }
         }
 


=====================================
modules/gui/qt/style/VLCStyle.qml
=====================================
@@ -232,8 +232,6 @@ QtObject {
 
     readonly property int artistBanner_height: MainCtx.dp(200, scale)
 
-    readonly property int playlistDelegate_verticalPadding: MainCtx.dp(6, scale)
-
     //global application size, updated by the root widget
     property int appWidth: 0
     property int appHeight: 0



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/0e4be111590da80c4a695e4efc4a007eae604bc8...1271d51e37c0bd00cd31023560716006fd5ede5c

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/0e4be111590da80c4a695e4efc4a007eae604bc8...1271d51e37c0bd00cd31023560716006fd5ede5c
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