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
Plasma
Plasma Desktop
Commits
035f5490
Verified
Commit
035f5490
authored
May 18, 2022
by
ivan tkachenko
Browse files
Panel: Fix rounding of panel's margins to integer to reduce flickering and text cut-off
parent
8d396fda
Pipeline
#178090
passed with stage
in 5 minutes and 58 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
desktoppackage/contents/views/Panel.qml
View file @
035f5490
...
...
@@ -100,8 +100,8 @@ Item {
property
var
panelMask
:
floatingness
===
0
?
(
panelOpacity
===
1
?
opaqueItem
.
mask
:
translucentItem
.
mask
)
:
(
panelOpacity
===
1
?
floatingOpaqueItem
.
mask
:
floatingTranslucentItem
.
mask
)
// These two values are read from panelview.cpp and are used as an offset for the mask
property
int
maskOffsetX
:
leftFloatingPadding
*
floatingness
property
int
maskOffsetY
:
topFloatingPadding
*
floatingness
property
int
maskOffsetX
:
Math
.
round
(
leftFloatingPadding
*
floatingness
)
property
int
maskOffsetY
:
Math
.
round
(
topFloatingPadding
*
floatingness
)
PlasmaCore.FrameSvgItem
{
id
:
translucentItem
...
...
@@ -115,10 +115,10 @@ Item {
visible
:
floatingness
!==
0
&&
panelOpacity
!==
1
anchors
{
fill
:
parent
bottomMargin
:
bottomFloatingPadding
*
floatingness
leftMargin
:
leftFloatingPadding
*
floatingness
rightMargin
:
rightFloatingPadding
*
floatingness
topMargin
:
topFloatingPadding
*
floatingness
bottomMargin
:
Math
.
round
(
bottomFloatingPadding
*
floatingness
)
leftMargin
:
Math
.
round
(
leftFloatingPadding
*
floatingness
)
rightMargin
:
Math
.
round
(
rightFloatingPadding
*
floatingness
)
topMargin
:
Math
.
round
(
topFloatingPadding
*
floatingness
)
}
imagePath
:
containment
&&
containment
.
backgroundHints
===
PlasmaCore
.
Types
.
NoBackground
?
""
:
"
widgets/panel-background
"
}
...
...
@@ -128,10 +128,10 @@ Item {
opacity
:
panelOpacity
anchors
{
fill
:
parent
bottomMargin
:
bottomFloatingPadding
*
floatingness
leftMargin
:
leftFloatingPadding
*
floatingness
rightMargin
:
rightFloatingPadding
*
floatingness
topMargin
:
topFloatingPadding
*
floatingness
bottomMargin
:
Math
.
round
(
bottomFloatingPadding
*
floatingness
)
leftMargin
:
Math
.
round
(
leftFloatingPadding
*
floatingness
)
rightMargin
:
Math
.
round
(
rightFloatingPadding
*
floatingness
)
topMargin
:
Math
.
round
(
topFloatingPadding
*
floatingness
)
}
imagePath
:
containment
&&
containment
.
backgroundHints
===
PlasmaCore
.
Types
.
NoBackground
?
""
:
"
solid/widgets/panel-background
"
}
...
...
@@ -239,7 +239,7 @@ Item {
return
;
}
return
containment
.
backgroundHints
;
return
containment
.
backgroundHints
;
}
restoreMode
:
Binding
.
RestoreBinding
}
...
...
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