[vlc-devel] [PATCH 04/14] qml: introduce MenuCaption widget
Prince Gupta
guptaprince8832 at gmail.com
Thu Jul 2 14:23:13 CEST 2020
---
modules/gui/qt/Makefile.am | 1 +
modules/gui/qt/style/VLCColors.qml | 1 +
modules/gui/qt/vlc.qrc | 1 +
modules/gui/qt/widgets/qml/MenuCaption.qml | 27 ++++++++++++++++++++++
4 files changed, 30 insertions(+)
create mode 100644 modules/gui/qt/widgets/qml/MenuCaption.qml
diff --git a/modules/gui/qt/Makefile.am b/modules/gui/qt/Makefile.am
index e3c78a3008..c8414d5d5f 100644
--- a/modules/gui/qt/Makefile.am
+++ b/modules/gui/qt/Makefile.am
@@ -670,6 +670,7 @@ libqt_plugin_la_QML = \
gui/qt/widgets/qml/ListItem.qml \
gui/qt/widgets/qml/ListLabel.qml \
gui/qt/widgets/qml/MediaCover.qml \
+ gui/qt/widgets/qml/MenuCaption.qml \
gui/qt/widgets/qml/MenuExt.qml \
gui/qt/widgets/qml/MenuItemExt.qml \
gui/qt/widgets/qml/NavigableCol.qml \
diff --git a/modules/gui/qt/style/VLCColors.qml b/modules/gui/qt/style/VLCColors.qml
index a92a090407..046c5c5e49 100644
--- a/modules/gui/qt/style/VLCColors.qml
+++ b/modules/gui/qt/style/VLCColors.qml
@@ -49,6 +49,7 @@ Item {
property color textDisabled: systemPalette.textDisabled;
property color caption: setColorAlpha(text, .4)
+ property color menuCaption: setColorAlpha(text, .6)
property color bg: systemPalette.base;
property color bgInactive: systemPalette.baseInactive;
diff --git a/modules/gui/qt/vlc.qrc b/modules/gui/qt/vlc.qrc
index 6c12e06b2b..c876c41443 100644
--- a/modules/gui/qt/vlc.qrc
+++ b/modules/gui/qt/vlc.qrc
@@ -215,6 +215,7 @@
<file alias="IconLabel.qml">widgets/qml/IconLabel.qml</file>
<file alias="ListLabel.qml">widgets/qml/ListLabel.qml</file>
<file alias="PlayCover.qml">widgets/qml/PlayCover.qml</file>
+ <file alias="MenuCaption.qml">widgets/qml/MenuCaption.qml</file>
<file alias="MediaCover.qml">widgets/qml/MediaCover.qml</file>
</qresource>
<qresource prefix="/util">
diff --git a/modules/gui/qt/widgets/qml/MenuCaption.qml b/modules/gui/qt/widgets/qml/MenuCaption.qml
new file mode 100644
index 0000000000..373b7937f6
--- /dev/null
+++ b/modules/gui/qt/widgets/qml/MenuCaption.qml
@@ -0,0 +1,27 @@
+/*****************************************************************************
+ * Copyright (C) 2020 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/"
+
+Label {
+ elide: Text.ElideRight
+ font.pixelSize: VLCStyle.fontSize_normal
+ color: VLCStyle.colors.menuCaption
+ verticalAlignment: Text.AlignVCenter
+}
--
2.25.1
More information about the vlc-devel
mailing list