[vlc-commits] qml: use custom widgets instead of Text in toolbar editor

Fatih Uzunoglu git at videolan.org
Tue Apr 6 09:55:03 UTC 2021


vlc | branch: master | Fatih Uzunoglu <fuzun54 at outlook.com> | Fri Apr  2 01:22:30 2021 +0300| [3fd1f2d326fbf627d5b53c524886280cc066986c] | committer: Pierre Lamot

qml: use custom widgets instead of Text in toolbar editor

Signed-off-by: Pierre Lamot <pierre at videolabs.io>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3fd1f2d326fbf627d5b53c524886280cc066986c
---

 modules/gui/qt/dialogs/toolbar/qml/EditorTabButton.qml         | 5 ++---
 modules/gui/qt/dialogs/toolbar/qml/ToolbarEditor.qml           | 5 ++---
 modules/gui/qt/dialogs/toolbar/qml/ToolbarEditorButtonList.qml | 9 +++++----
 3 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/modules/gui/qt/dialogs/toolbar/qml/EditorTabButton.qml b/modules/gui/qt/dialogs/toolbar/qml/EditorTabButton.qml
index b9a105e580..c26be0eca0 100644
--- a/modules/gui/qt/dialogs/toolbar/qml/EditorTabButton.qml
+++ b/modules/gui/qt/dialogs/toolbar/qml/EditorTabButton.qml
@@ -19,6 +19,7 @@ import QtQuick 2.11
 import QtQuick.Controls 2.4
 
 import "qrc:///style/"
+import "qrc:///widgets/" as Widgets
 
 TabButton {
     id: mainPlayerControl
@@ -28,11 +29,9 @@ TabButton {
 
     implicitWidth: VLCStyle.button_width_large
 
-    contentItem: Text {
+    contentItem: Widgets.ListLabel {
         text: mainPlayerControl.text
-        color: VLCStyle.colors.buttonText
         horizontalAlignment: Text.AlignHCenter
-        verticalAlignment: Text.AlignVCenter
     }
 
     background: Rectangle {
diff --git a/modules/gui/qt/dialogs/toolbar/qml/ToolbarEditor.qml b/modules/gui/qt/dialogs/toolbar/qml/ToolbarEditor.qml
index e317fdf419..3355e93433 100644
--- a/modules/gui/qt/dialogs/toolbar/qml/ToolbarEditor.qml
+++ b/modules/gui/qt/dialogs/toolbar/qml/ToolbarEditor.qml
@@ -24,6 +24,7 @@ import org.videolan.vlc 0.1
 
 import "qrc:///player/" as Player
 import "qrc:///style/"
+import "qrc:///widgets/" as Widgets
 
 Rectangle{
     id: root
@@ -320,11 +321,9 @@ Rectangle{
             ColumnLayout{
                 anchors.fill: parent
 
-                Text {
+                Widgets.MenuCaption {
                     Layout.margins: VLCStyle.margin_xxsmall
                     text: i18n.qtr("Drag items below to add them above: ")
-                    font.pointSize: VLCStyle.fontHeight_xsmall
-                    color: VLCStyle.colors.buttonText
                 }
 
                 ToolbarEditorButtonList {
diff --git a/modules/gui/qt/dialogs/toolbar/qml/ToolbarEditorButtonList.qml b/modules/gui/qt/dialogs/toolbar/qml/ToolbarEditorButtonList.qml
index 93eb2c0c50..8ec2dae238 100644
--- a/modules/gui/qt/dialogs/toolbar/qml/ToolbarEditorButtonList.qml
+++ b/modules/gui/qt/dialogs/toolbar/qml/ToolbarEditorButtonList.qml
@@ -23,6 +23,7 @@ import QtQuick.Layouts 1.3
 import org.videolan.vlc 0.1
 
 import "qrc:///style/"
+import "qrc:///widgets/" as Widgets
 
 GridView{
     id: allButtonsView
@@ -146,15 +147,15 @@ GridView{
                 Layout.alignment: Qt.AlignHCenter
                 text: controlButtons.buttonL[model.index].label
             }
-            Text {
+
+            Widgets.ListSubtitleLabel {
                 id: buttonName
                 Layout.fillWidth: true
                 Layout.fillHeight: true
+
+                elide: Text.ElideNone
                 text: controlButtons.buttonL[model.index].text
-                font.pointSize: VLCStyle.fontHeight_xsmall
-                color: VLCStyle.colors.buttonText
                 wrapMode: Text.WordWrap
-                verticalAlignment: Text.AlignVCenter
                 horizontalAlignment: Text.AlignHCenter
             }
         }



More information about the vlc-commits mailing list