[vlc-commits] qml: paintOnly for IconToolButton

Rohan Rajpal git at videolan.org
Wed Aug 21 16:26:38 CEST 2019


vlc | branch: master | Rohan Rajpal <rohan17089 at iiitd.ac.in> | Tue Jul 30 11:21:34 2019 +0530| [7fbacc6976341b0c1d3c396d4eed3387f290a0e0] | committer: Jean-Baptiste Kempf

qml: paintOnly for IconToolButton

Add support for IconToolButton.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/gui/qt/qml/utils/IconToolButton.qml | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt/qml/utils/IconToolButton.qml b/modules/gui/qt/qml/utils/IconToolButton.qml
index 6b0bcd0199..57dc3e4128 100644
--- a/modules/gui/qt/qml/utils/IconToolButton.qml
+++ b/modules/gui/qt/qml/utils/IconToolButton.qml
@@ -22,7 +22,8 @@ import "qrc:///style/"
 
 ToolButton {
     id: control
-    property color color: control.enabled ?
+    property bool paintOnly: false
+    property color color: control.enabled || paintOnly?
                               VLCStyle.colors.buttonText : VLCStyle.colors.lightText
 
     property int size: VLCStyle.icon_normal
@@ -33,12 +34,15 @@ ToolButton {
 
     property color colorOverlay: "transparent"
     property string textOverlay: ""
+    property bool borderEnabled: false
+
+    enabled: !paintOnly
 
     contentItem: Item {
 
         Rectangle{
             anchors.fill: parent
-            visible: control.checked
+            visible: control.checked && !paintOnly
             color: VLCStyle.colors.bannerHover
         }
 



More information about the vlc-commits mailing list