[vlc-commits] qml: introduce IconLabel
Prince Gupta
git at videolan.org
Wed Jun 3 13:23:37 CEST 2020
vlc | branch: master | Prince Gupta <guptaprince8832 at gmail.com> | Mon May 25 21:15:40 2020 +0530| [062fa6de9ea65e9ac3f1df176a915ff2ce7af74a] | committer: Pierre Lamot
qml: introduce IconLabel
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=062fa6de9ea65e9ac3f1df176a915ff2ce7af74a
---
modules/gui/qt/Makefile.am | 1 +
modules/gui/qt/vlc.qrc | 1 +
modules/gui/qt/widgets/qml/IconLabel.qml | 30 ++++++++++++++++++++++++++++++
3 files changed, 32 insertions(+)
diff --git a/modules/gui/qt/Makefile.am b/modules/gui/qt/Makefile.am
index 27ded2a21f..cf6e9c10b5 100644
--- a/modules/gui/qt/Makefile.am
+++ b/modules/gui/qt/Makefile.am
@@ -654,6 +654,7 @@ libqt_plugin_la_QML = \
gui/qt/widgets/qml/ExpandGridView.qml \
gui/qt/widgets/qml/FocusBackground.qml \
gui/qt/widgets/qml/GridItem.qml \
+ gui/qt/widgets/qml/IconLabel.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 e77665e892..86a17f22bf 100644
--- a/modules/gui/qt/vlc.qrc
+++ b/modules/gui/qt/vlc.qrc
@@ -210,6 +210,7 @@
<file alias="TabButtonExt.qml">widgets/qml/TabButtonExt.qml</file>
<file alias="ScrollingText.qml">widgets/qml/ScrollingText.qml</file>
<file alias="CaptionLabel.qml">widgets/qml/CaptionLabel.qml</file>
+ <file alias="IconLabel.qml">widgets/qml/IconLabel.qml</file>
</qresource>
<qresource prefix="/util">
<file alias="SelectableDelegateModel.qml">util/qml/SelectableDelegateModel.qml</file>
diff --git a/modules/gui/qt/widgets/qml/IconLabel.qml b/modules/gui/qt/widgets/qml/IconLabel.qml
new file mode 100644
index 0000000000..9317cf35da
--- /dev/null
+++ b/modules/gui/qt/widgets/qml/IconLabel.qml
@@ -0,0 +1,30 @@
+/*****************************************************************************
+ * 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
+ color: VLCStyle.colors.text
+
+ font {
+ pixelSize: VLCStyle.icon_small
+ family: VLCIcons.fontFamily
+ }
+}
More information about the vlc-commits
mailing list