Commit 5328c8b6 authored by Niccolò Venerandi's avatar Niccolò Venerandi Committed by Nate Graham
Browse files

Use ThickMargin to redirect mouse input to panel and update spacingAtMinSize value


(cherry picked from commit c540181a)
parent 544f4baa
......@@ -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) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment