[vlc-devel] [PATCH 25/33] qml: add IconControlButton widget

Prince Gupta guptaprince8832 at gmail.com
Wed Feb 3 10:56:41 UTC 2021


---
 modules/gui/qt/Makefile.am                    |  1 +
 modules/gui/qt/vlc.qrc                        |  1 +
 .../gui/qt/widgets/qml/IconControlButton.qml  | 31 +++++++++++++++++++
 3 files changed, 33 insertions(+)
 create mode 100644 modules/gui/qt/widgets/qml/IconControlButton.qml

diff --git a/modules/gui/qt/Makefile.am b/modules/gui/qt/Makefile.am
index 7a2665d0a1..7d6d60bf66 100644
--- a/modules/gui/qt/Makefile.am
+++ b/modules/gui/qt/Makefile.am
@@ -718,6 +718,7 @@ libqt_plugin_la_QML = \
 	gui/qt/widgets/qml/HorizontalResizeHandle.qml \
 	gui/qt/widgets/qml/IconLabel.qml \
 	gui/qt/widgets/qml/IconButton.qml \
+	gui/qt/widgets/qml/IconControlButton.qml \
 	gui/qt/widgets/qml/IconToolButton.qml \
 	gui/qt/widgets/qml/ImageToolButton.qml \
 	gui/qt/widgets/qml/KeyNavigableGridView.qml \
diff --git a/modules/gui/qt/vlc.qrc b/modules/gui/qt/vlc.qrc
index 3c3a581f04..f04c4e7eea 100644
--- a/modules/gui/qt/vlc.qrc
+++ b/modules/gui/qt/vlc.qrc
@@ -247,6 +247,7 @@
         <file alias="CoverShadow.qml">widgets/qml/CoverShadow.qml</file>
         <file alias="ListCoverShadow.qml">widgets/qml/ListCoverShadow.qml</file>
         <file alias="OverlayMenu.qml">widgets/qml/OverlayMenu.qml</file>
+        <file alias="IconControlButton.qml">widgets/qml/IconControlButton.qml</file>
     </qresource>
     <qresource prefix="/network">
         <file alias="AddressbarButton.qml">network/qml/AddressbarButton.qml</file>
diff --git a/modules/gui/qt/widgets/qml/IconControlButton.qml b/modules/gui/qt/widgets/qml/IconControlButton.qml
new file mode 100644
index 0000000000..d8b65dcbb8
--- /dev/null
+++ b/modules/gui/qt/widgets/qml/IconControlButton.qml
@@ -0,0 +1,31 @@
+/*****************************************************************************
+ * Copyright (C) 2021 VLC authors and VideoLAN
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * ( at your option ) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+import QtQuick 2.11
+import QtQuick.Controls 2.4
+
+import "qrc:///style/"
+
+IconToolButton {
+    id: control
+
+    property VLCColors colors: VLCStyle.colors
+
+    color: colors.playerControlBarFg
+    colorDisabled: colors.blendColors(control.colors.playerBg, control.colors.playerControlBarFg, .75)
+    colorOverlay: "transparent"
+}
-- 
2.25.1



More information about the vlc-devel mailing list