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
5328c8b6
Commit
5328c8b6
authored
Feb 06, 2021
by
Niccolò Venerandi
Committed by
Nate Graham
Feb 06, 2021
Browse files
Use ThickMargin to redirect mouse input to panel and update spacingAtMinSize value
(cherry picked from commit
c540181a
)
parent
544f4baa
Changes
1
Hide whitespace changes
Inline
Side-by-side
desktoppackage/contents/views/Panel.qml
View file @
5328c8b6
...
...
@@ -35,11 +35,17 @@ PlasmaCore.FrameSvgItem {
readonly
property
bool
verticalPanel
:
containment
&&
containment
.
formFactor
===
PlasmaCore
.
Types
.
Vertical
readonly
property
real
spacingAtMinSize
:
Math
.
max
(
1
,
(
verticalPanel
?
root
.
width
:
root
.
height
)
-
PlasmaCore
.
Units
.
iconSizes
.
smallMedium
-
PlasmaCore
.
Units
.
smallSpacing
*
2
)
/
2
readonly
property
int
topPadding
:
Math
.
round
(
Math
.
min
(
root
.
fixedMargins
.
top
,
spacingAtMinSize
));
readonly
property
int
bottomPadding
:
Math
.
round
(
Math
.
min
(
root
.
fixedMargins
.
bottom
,
spacingAtMinSize
));
readonly
property
int
leftPadding
:
Math
.
round
(
Math
.
min
(
root
.
fixedMargins
.
left
,
spacingAtMinSize
));
readonly
property
int
rightPadding
:
Math
.
round
(
Math
.
min
(
root
.
fixedMargins
.
right
,
spacingAtMinSize
));
readonly
property
real
spacingAtMinSize
:
Math
.
round
(
Math
.
max
(
1
,
(
verticalPanel
?
root
.
width
:
root
.
height
)
-
units
.
iconSizes
.
smallMedium
)
/
2
)
PlasmaCore.FrameSvgItem
{
id
:
thickPanelSvg
visible
:
false
prefix
:
'
thick
'
imagePath
:
"
widgets/panel-background
"
}
readonly
property
int
topPadding
:
Math
.
round
(
Math
.
min
(
thickPanelSvg
.
fixedMargins
.
top
,
spacingAtMinSize
));
readonly
property
int
bottomPadding
:
Math
.
round
(
Math
.
min
(
thickPanelSvg
.
fixedMargins
.
bottom
,
spacingAtMinSize
));
readonly
property
int
leftPadding
:
Math
.
round
(
Math
.
min
(
thickPanelSvg
.
fixedMargins
.
left
,
spacingAtMinSize
));
readonly
property
int
rightPadding
:
Math
.
round
(
Math
.
min
(
thickPanelSvg
.
fixedMargins
.
right
,
spacingAtMinSize
));
function
adjustPrefix
()
{
if
(
!
containment
)
{
...
...
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