mirror of https://code.videolan.org/videolan/vlc
qt: add LabelExt.qml
LabelExt shows tool tip by default if its width is not sufficient.
This commit is contained in:
parent
cd06bb5ec3
commit
a7c21e837e
|
@ -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 \
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue