Commit c540181a authored by Niccolò Venerandi's avatar Niccolò Venerandi
Browse files

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

parent d2514ede
......@@ -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