[vlc-commits] [Git][videolan/vlc][master] 5 commits: qt: add LabelExt.qml
Steve Lhomme (@robUx4)
gitlab at videolan.org
Mon Mar 25 12:20:11 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
a7c21e83 by Fatih Uzunoglu at 2024-03-25T11:56:39+00:00
qt: add LabelExt.qml
LabelExt shows tool tip by default if its
width is not sufficient.
- - - - -
f0496f62 by Fatih Uzunoglu at 2024-03-25T11:56:39+00:00
qml: derive from LabelExt in CaptionLabel
- - - - -
ce1a7fee by Fatih Uzunoglu at 2024-03-25T11:56:39+00:00
qml: derive from LabelExt in ListLabel
- - - - -
a320b059 by Fatih Uzunoglu at 2024-03-25T11:56:39+00:00
qml: derive from LabelExt in MenuLabel
- - - - -
bb88cd5a by Fatih Uzunoglu at 2024-03-25T11:56:39+00:00
qml: derive from LabelExt in SubtitleLabel
- - - - -
7 changed files:
- modules/gui/qt/Makefile.am
- modules/gui/qt/vlc.qrc
- modules/gui/qt/widgets/qml/CaptionLabel.qml
- + modules/gui/qt/widgets/qml/LabelExt.qml
- modules/gui/qt/widgets/qml/ListLabel.qml
- modules/gui/qt/widgets/qml/MenuLabel.qml
- modules/gui/qt/widgets/qml/SubtitleLabel.qml
Changes:
=====================================
modules/gui/qt/Makefile.am
=====================================
@@ -1030,6 +1030,7 @@ libqt_plugin_la_QML = \
util/qml/NativeMenu.qml \
util/qml/MLContextMenu.qml \
util/qml/FadeControllerStateGroup.qml \
+ widgets/qml/LabelExt.qml \
widgets/qml/ActionButtonOverlay.qml \
widgets/qml/ActionButtonPrimary.qml \
widgets/qml/BannerTabButton.qml \
=====================================
modules/gui/qt/vlc.qrc
=====================================
@@ -150,6 +150,7 @@
<file alias="MainViewLoader.qml">maininterface/qml/MainViewLoader.qml</file>
</qresource>
<qresource prefix="/widgets">
+ <file alias="LabelExt.qml">widgets/qml/LabelExt.qml</file>
<file alias="EmptyLabel.qml">widgets/qml/EmptyLabel.qml</file>
<file alias="EmptyLabelButton.qml">widgets/qml/EmptyLabelButton.qml</file>
<file alias="EmptyLabelHint.qml">widgets/qml/EmptyLabelHint.qml</file>
=====================================
modules/gui/qt/widgets/qml/CaptionLabel.qml
=====================================
@@ -16,10 +16,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
import QtQuick 2.12
-import QtQuick.Templates 2.12 as T
import "qrc:///style/"
-T.Label {
+LabelExt {
elide: Text.ElideRight
font.pixelSize: VLCStyle.fontSize_normal
textFormat: Text.PlainText
=====================================
modules/gui/qt/widgets/qml/LabelExt.qml
=====================================
@@ -0,0 +1,30 @@
+/*****************************************************************************
+ * Copyright (C) 2024 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.12
+import QtQuick.Templates 2.12 as T
+import "qrc:///style/"
+
+T.Label {
+ T.ToolTip.visible: (elide !== Text.ElideNone) && (width < implicitWidth) && hoverHandler.hovered
+ T.ToolTip.delay: VLCStyle.delayToolTipAppear
+ T.ToolTip.text: text
+
+ HoverHandler {
+ id: hoverHandler
+ }
+}
=====================================
modules/gui/qt/widgets/qml/ListLabel.qml
=====================================
@@ -16,10 +16,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
import QtQuick 2.12
-import QtQuick.Templates 2.12 as T
import "qrc:///style/"
-T.Label {
+LabelExt {
elide: Text.ElideRight
font.pixelSize: VLCStyle.fontSize_normal
font.weight: Font.DemiBold
=====================================
modules/gui/qt/widgets/qml/MenuLabel.qml
=====================================
@@ -16,10 +16,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
import QtQuick 2.12
-import QtQuick.Templates 2.12 as T
import "qrc:///style/"
-T.Label {
+LabelExt {
elide: Text.ElideRight
font.pixelSize: VLCStyle.fontSize_large
font.weight: Font.DemiBold
=====================================
modules/gui/qt/widgets/qml/SubtitleLabel.qml
=====================================
@@ -16,10 +16,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
import QtQuick 2.12
-import QtQuick.Templates 2.12 as T
import "qrc:///style/"
-T.Label {
+LabelExt {
elide: Text.ElideRight
font.pixelSize: VLCStyle.fontSize_xxxlarge
font.weight: Font.Bold
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/cd06bb5ec3f4039b8fbb67024239677f732b2936...bb88cd5aa904eeb22b67117f6096dfdf23a6db62
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/cd06bb5ec3f4039b8fbb67024239677f732b2936...bb88cd5aa904eeb22b67117f6096dfdf23a6db62
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list