Commit 344974c4 authored by David Edmundson's avatar David Edmundson
Browse files

Fix minimum size on the Applet Handle

- center align the noBackgroundHandle and obey the minimumHeight

- made the mouse event listener that controls whether to show the
handle separate from the size of the applet, so we can still reach the
controls when the applet is smaller than the handle

BUG: 332245
parent 6a6eac77
......@@ -98,7 +98,11 @@ Item {
KQuickControlsAddons.MouseEventListener {
id: mouseListener
anchors { left: parent.left; top: parent.top; bottom: parent.bottom; }
anchors {
left: parent.left
verticalCenter: parent.verticalCenter
}
height: handleHeight
width: parent.width+handleWidth;
z: 10
......@@ -133,6 +137,14 @@ Item {
onTriggered: showAppletHandle = true;
}
Rectangle { color: Qt.rgba(0,0,0,0); border.width: 3; border.color: "red"; opacity: 0.5; visible: debug; anchors.fill: parent; }
}
Item {
anchors { left: parent.left; top: parent.top; bottom: parent.bottom; }
width: parent.width+handleWidth;
z: mouseListener.z + 4
PlasmaCore.FrameSvgItem {
id: plasmoidBackground
......@@ -140,7 +152,6 @@ Item {
imagePath: "widgets/background"
anchors { left: parent.left; top: parent.top; bottom: parent.bottom; }
width: (showAppletHandle && handleMerged) ? parent.width : parent.width-handleWidth;
z: mouseListener.z-4
smooth: true
Behavior on width {
......@@ -207,6 +218,7 @@ Item {
lastX = globalMousePos.x
lastY = globalMousePos.y
placeHolder.syncWithItem(appletItem)
placeHolderPaint.opacity = root.haloOpacity;
}
......
......@@ -47,8 +47,12 @@ Item {
visible: controlsOpacity > 0
z: plasmoidBackground.z - 10
height: (backgroundHints != "NoBackground") ? appletItem.handleHeight : appletItem.handleHeight + noBackgroundHandle.margins.top + noBackgroundHandle.margins.bottom
anchors {
fill: parent
left: parent.left
right: parent.right
verticalCenter: parent.verticalCenter
leftMargin: -margins.left
topMargin: -margins.top
......
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