vlc | branch: master | Rohan Rajpal <[email protected]> | Mon Jun 17 20:42:58 2019 +0530| [90e20e354130a79da515141e38db3b26710a32d1] | committer: Jean-Baptiste Kempf
qml: Add stack support to Icons Add icon stacking support to IconToolButton Also add changes color when icon is checked Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=90e20e354130a79da515141e38db3b26710a32d1 --- modules/gui/qt/qml/utils/IconToolButton.qml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/modules/gui/qt/qml/utils/IconToolButton.qml b/modules/gui/qt/qml/utils/IconToolButton.qml index d142d0632f..6b0bcd0199 100644 --- a/modules/gui/qt/qml/utils/IconToolButton.qml +++ b/modules/gui/qt/qml/utils/IconToolButton.qml @@ -23,7 +23,7 @@ import "qrc:///style/" ToolButton { id: control property color color: control.enabled ? - VLCStyle.colors.buttonText : VLCStyle.colors.lightText + VLCStyle.colors.buttonText : VLCStyle.colors.lightText property int size: VLCStyle.icon_normal @@ -31,8 +31,17 @@ ToolButton { padding: 0 + property color colorOverlay: "transparent" + property string textOverlay: "" + contentItem: Item { + Rectangle{ + anchors.fill: parent + visible: control.checked + color: VLCStyle.colors.bannerHover + } + Rectangle { anchors.fill: parent visible: control.activeFocus || control.hovered || control.highlighted @@ -51,6 +60,21 @@ ToolButton { verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter + + Label { + text: control.textOverlay + color: control.colorOverlay + + anchors.centerIn: parent + + font.pixelSize: control.size + font.family: VLCIcons.fontFamily + + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + + } + } } _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
