Skip to content
GitLab
Menu
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
ad8b9ff0
Commit
ad8b9ff0
authored
Mar 01, 2022
by
Tranter Madi
🌧
Browse files
Simplify LabelWidthTooltip.qml
parent
2724e2b4
Pipeline
#144127
passed with stage
in 3 minutes and 38 seconds
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
src/qml/LabelWithToolTip.qml
View file @
ad8b9ff0
...
...
@@ -6,8 +6,6 @@
import
QtQuick
2.7
import
QtQuick
.
Controls
2.2
import
QtGraphicalEffects
1.0
import
QtQuick
.
Window
2.2
import
org
.
kde
.
kirigami
2.5
as
Kirigami
Kirigami.Heading
{
...
...
@@ -16,33 +14,18 @@ Kirigami.Heading {
level
:
5
textFormat
:
Text
.
PlainText
horizontalAlignment
:
Text
.
AlignLeft
elide
:
Text
.
ElideRight
Loader
{
id
:
mouseArea
anchors.fill
:
parent
active
:
theLabel
.
truncated
visible
:
theLabel
.
truncated
sourceComponent
:
MouseArea
{
id
:
hoverArea
anchors.fill
:
parent
hoverEnabled
:
true
acceptedButtons
:
Qt
.
NoButton
Loader
{
anchors.fill
:
parent
active
:
hoverArea
&&
hoverArea
.
containsMouse
sourceComponent
:
ToolTip
{
delay
:
Qt
.
styleHints
.
mousePressAndHoldInterval
visible
:
hoverArea
&&
hoverArea
.
containsMouse
&&
theLabel
.
truncated
text
:
theLabel
.
text
}
}
}
}
ToolTip.visible
:
mouseArea
.
active
?
mouseArea
.
item
.
containsMouse
:
false
ToolTip.delay
:
Qt
.
styleHints
.
mousePressAndHoldInterval
ToolTip.text
:
theLabel
.
text
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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