François Cartegnie pushed to branch master at VideoLAN / VLC


Commits:
d3d50d35 by Prince Gupta at 2024-03-24T13:58:14+00:00
qml: don't use icon font for normal text

also remove superfluous column wrapping

- - - - -


1 changed file:

- modules/gui/qt/player/qml/TracksListPage.qml


Changes:

=====================================
modules/gui/qt/player/qml/TracksListPage.qml
=====================================
@@ -44,47 +44,26 @@ RowLayout {
 
     focus: true
 
-    onActiveFocusChanged: if (activeFocus) column.forceActiveFocus()
+    onActiveFocusChanged: if (activeFocus) playbackBtn.forceActiveFocus()
 
-    Widgets.NavigableCol {
-        id: column
+    Widgets.ButtonExt {
+        id: playbackBtn
 
-        focus: true
+        text: I18n.qtr("%1x").arg(+Player.rate.toFixed(2))
 
-        Layout.preferredWidth: VLCStyle.dp(72, VLCStyle.scale)
-        Layout.alignment: Qt.AlignTop | Qt.AlignLeft
-        Layout.topMargin: VLCStyle.margin_large
-
-        Navigation.rightItem: row
-
-        //we store the model in a different property as functions can't be 
passed in modelData
-        property var modelDefination: [{
-            "tooltip": I18n.qtr("Playback Speed"),
-            "action": function () {
-                trackMenuController.requestPlaybackSpeedPage()
-            }
-        }]
-
-        model: modelDefination
-
-        delegate: Widgets.IconTrackButton {
-            font.pixelSize: (index === 0) ? VLCStyle.fontSize_large
-                                          : VLCStyle.dp(40, VLCStyle.scale)
-
-            x: (column.width - width) / 2
-
-            text: (index === 0) ? I18n.qtr("%1x").arg(+Player.rate.toFixed(2))
-                                : modelData.icon
-
-            T.ToolTip.visible: (hovered || visualFocus)
-            T.ToolTip.delay: VLCStyle.delayToolTipAppear
+        onPressed: {
+            trackMenuController.requestPlaybackSpeedPage()
+        }
 
-            description: modelData.tooltip
+        T.ToolTip.visible: (hovered || visualFocus)
+        T.ToolTip.text: I18n.qtr("Playback Speed")
+        T.ToolTip.delay: VLCStyle.delayToolTipAppear
 
-            Navigation.parentItem: column
+        Navigation.parentItem: root
+        Navigation.rightItem: row
 
-            onClicked: column.modelDefination[index].action()
-        }
+        Layout.alignment: Qt.AlignTop | Qt.AlignLeft
+        Layout.margins: VLCStyle.margin_large
     }
 
     Widgets.NavigableRow {
@@ -93,7 +72,7 @@ RowLayout {
         Layout.fillHeight: true
         Layout.fillWidth: true
 
-        Navigation.leftItem: column
+        Navigation.leftItem: playbackBtn
 
         //we store the model in a different property as functions can't be 
passed in modelData
         property var modelDefinition: [{



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/d3d50d3576c06a6000f052a357067f524f6b586b

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/d3d50d3576c06a6000f052a357067f524f6b586b
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to