Commit b62ed146 authored by Nate Graham's avatar Nate Graham
Browse files

[panel] Fix dragging panel to resize for top and right panels

Previously, dragging up or right was always required to increase the
value of the spinbox and hance increase the thickness of the panel.
This makes sense for bottom and left panels, but is inverted for top
and right panels.

This commit reverses the stepSize when using a top or right panel, which
has the result that you can now always drag the SpinBox in the direction
of where you want the panel to resize no matter which screen edge the
panel is on.

BUG: 429063
FIXED-IN: 5.20.4
parent 56c526e9
......@@ -119,7 +119,11 @@ Item {
from: 20 // below this size, the panel is mostly unusable
to: PlasmaCore.Types.LeftEdge || panel.location === PlasmaCore.Types.RightEdge ? panel.screenToFollow.geometry.width / 2 : panel.screenToFollow.geometry.height / 2
stepSize: 2
// When the panel is on the top or left, we need to reverse the drag
// and scroll directions so people can drag and scroll towards the
// center of the screen
stepSize: panel.location === PlasmaCore.Types.TopEdge || panel.location === PlasmaCore.Types.RightEdge ? -2 : 2
value: panel.thickness
onValueModified: {
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