Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Elisa
Commits
bc72f925
Commit
bc72f925
authored
Mar 02, 2022
by
Nate Graham
Browse files
Port LabelWithToolTip to use HoverHandler
It's much lighter weight than MouseArea is, and does the same thing.
parent
ad8b9ff0
Pipeline
#144155
passed with stage
in 3 minutes and 38 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/qml/LabelWithToolTip.qml
View file @
bc72f925
...
...
@@ -4,7 +4,7 @@
SPDX-License-Identifier: LGPL-3.0-or-later
*/
import
QtQuick
2.
7
import
QtQuick
2.
15
import
QtQuick
.
Controls
2.2
import
org
.
kde
.
kirigami
2.5
as
Kirigami
...
...
@@ -16,16 +16,11 @@ Kirigami.Heading {
textFormat
:
Text
.
PlainText
elide
:
Text
.
ElideRight
Loader
{
id
:
mouseArea
anchors.fill
:
parent
active
:
theLabel
.
truncated
sourceComponent
:
MouseArea
{
hoverEnabled
:
true
acceptedButtons
:
Qt
.
NoButton
}
HoverHandler
{
id
:
hoverHandler
enabled
:
theLabel
.
truncated
}
ToolTip.visible
:
mouseArea
.
active
?
mouseArea
.
item
.
containsMouse
:
false
ToolTip.visible
:
hoverHandler
.
enabled
?
hoverHandler
.
hovered
:
false
ToolTip.delay
:
Qt
.
styleHints
.
mousePressAndHoldInterval
ToolTip.text
:
theLabel
.
text
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment