[vlc-devel] [PATCH 06/16] qml: provide visuals for spacer widgets in paint only mode
Rohan Rajpal
rohan17089 at iiitd.ac.in
Wed Jul 31 14:30:46 CEST 2019
Modify space and extended space to display space icon
in the editor.
---
modules/gui/qt/qml/player/ControlButtons.qml | 38 ++++++++++++++++++--
modules/gui/qt/qml/style/VLCStyle.qml | 1 +
2 files changed, 37 insertions(+), 2 deletions(-)
diff --git a/modules/gui/qt/qml/player/ControlButtons.qml b/modules/gui/qt/qml/player/ControlButtons.qml
index e0bcac67ea..2020da1fef 100644
--- a/modules/gui/qt/qml/player/ControlButtons.qml
+++ b/modules/gui/qt/qml/player/ControlButtons.qml
@@ -190,7 +190,24 @@ Item{
id:spacerDelegate
Item {
id: spacer
- implicitWidth: 32 * VLCStyle.scale
+ implicitWidth: VLCStyle.icon_normal
+ implicitHeight: VLCStyle.icon_normal
+ property alias spacetextExt: spacetext
+ property bool paintOnly: false
+ Label {
+ id: spacetext
+ text: VLCIcons.space
+ color: VLCStyle.colors.buttonText
+ visible: parent.paintOnly
+
+ anchors.centerIn: parent
+
+ font.pixelSize: VLCStyle.icon_medium
+ font.family: VLCIcons.fontFamily
+
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignHCenter
+ }
property bool acceptFocus: false
}
}
@@ -199,7 +216,24 @@ Item{
id: extendiblespacerDelegate
Item{
id: extendedspacer
- implicitWidth: 128 * VLCStyle.scale
+ implicitWidth: VLCStyle.widthExtendedSpacer
+ implicitHeight: VLCStyle.icon_normal
+ property bool paintOnly: false
+ property alias spacetextExt: spacetext
+ Label {
+ id: spacetext
+ text: VLCIcons.space
+ color: VLCStyle.colors.buttonText
+ visible: paintOnly
+
+ anchors.centerIn: parent
+
+ font.pixelSize: VLCStyle.icon_medium
+ font.family: VLCIcons.fontFamily
+
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignHCenter
+ }
property bool acceptFocus: false
Component.onCompleted: {
parent.Layout.fillWidth=true
diff --git a/modules/gui/qt/qml/style/VLCStyle.qml b/modules/gui/qt/qml/style/VLCStyle.qml
index 0a33aa89dc..76d32ed569 100644
--- a/modules/gui/qt/qml/style/VLCStyle.qml
+++ b/modules/gui/qt/qml/style/VLCStyle.qml
@@ -99,6 +99,7 @@ Item {
property int widthSearchInput: 200 * scale;
property int widthSortBox: 150 * scale;
property int widthTeletext: 280 * scale;
+ property int widthExtendedSpacer: 128 * scale;
property int heightInput: 22 * scale;
property int selectedBorder: 2
--
2.17.1
More information about the vlc-devel
mailing list