Commit bf45a1d5 authored by Anthony Hung's avatar Anthony Hung Committed by Nate Graham
Browse files

containments/panel: `spacingAtMinSize` use Math.floor

The `spacingAtMinSize` will be used to calculate the container margins.

 `Math.floor` is used to get a more consistent scaling
 when the panel height is changed

BUG: 454810
parent 3613e4f8
Pipeline #190388 passed with stage
in 3 minutes and 17 seconds
......@@ -56,7 +56,7 @@ DragDrop.DropArea {
property var marginHighlightSvg: PlasmaCore.Svg{imagePath: "widgets/margins-highlight"}
//Margins are either the size of the margins in the SVG, unless that prevents the panel from being at least half a smallMedium icon) tall at which point we set the margin to whatever allows it to be that...or if it still won't fit, 1.
//the size a margin should be to force a panel to be the required size above
readonly property real spacingAtMinSize: Math.round(Math.max(1, (isHorizontal ? root.height : root.width) - units.iconSizes.smallMedium)/2)
readonly property real spacingAtMinSize: Math.floor(Math.max(1, (isHorizontal ? root.height : root.width) - units.iconSizes.smallMedium)/2)
//END properties
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