Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Frameworks
QQC2 Desktop Style
Commits
1560f9a9
Commit
1560f9a9
authored
Jun 07, 2020
by
Noah Davis
🌵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make ToolTips more consistent with Breeze widget style tooltips
parent
8671ecdb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
org.kde.desktop/ToolTip.qml
org.kde.desktop/ToolTip.qml
+15
-6
No files found.
org.kde.desktop/ToolTip.qml
View file @
1560f9a9
...
...
@@ -24,8 +24,10 @@ T.ToolTip {
// Always show the tooltip on top of everything else
z
:
999
implicitWidth
:
contentItem
.
implicitWidth
+
leftPadding
+
rightPadding
implicitHeight
:
contentItem
.
implicitHeight
+
topPadding
+
bottomPadding
// Math.ceil() prevents blurry edges and prevents unecessary text wrapping
// (vs using floor or sometimes round).
implicitWidth
:
Math
.
ceil
(
contentItem
.
implicitWidth
)
+
leftPadding
+
rightPadding
implicitHeight
:
Math
.
ceil
(
contentItem
.
implicitHeight
)
+
topPadding
+
bottomPadding
margins
:
6
padding
:
6
...
...
@@ -45,15 +47,22 @@ T.ToolTip {
color
:
Kirigami
.
Theme
.
textColor
}
// TODO: Consider replacing this with a StyleItem
background
:
Kirigami.ShadowedRectangle
{
radius
:
3
opacity
:
0.95
color
:
Kirigami
.
Theme
.
backgroundColor
Kirigami.Theme.colorSet
:
Kirigami
.
Theme
.
Tooltip
// Roughly but doesn't exactly match the medium shadow setting for Breeze menus/tooltips.
// TODO: Find a way to more closely match the user's Breeze settings.
shadow.xOffset
:
0
shadow.yOffset
:
2
shadow.size
:
4
shadow.color
:
Qt
.
rgba
(
0
,
0
,
0
,
0.3
)
shadow.yOffset
:
4
shadow.size
:
16
shadow.color
:
Qt
.
rgba
(
0
,
0
,
0
,
0.2
)
border.width
:
1
// TODO: Replace this with a frame or separator color role if that becomes a thing.
// Matches the color used by Breeze::Style::drawPanelTipLabelPrimitive()
border.color
:
Kirigami
.
ColorUtils
.
linearInterpolation
(
background
.
color
,
Kirigami
.
Theme
.
textColor
,
0.25
)
}
}
Write
Preview
Markdown
is supported
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