diff --git a/kcm/package/contents/ui/Output.qml b/kcm/package/contents/ui/Output.qml --- a/kcm/package/contents/ui/Output.qml +++ b/kcm/package/contents/ui/Output.qml @@ -24,6 +24,7 @@ id: output property bool isSelected: root.selectedOutput === model.index + property size outputSize: model.size onIsSelectedChanged: { if (isSelected) { @@ -39,7 +40,9 @@ } visible: model.enabled && model.replicationSourceIndex === 0 + onVisibleChanged: screen.resetTotalSize() + onOutputSizeChanged: screen.resetTotalSize() x: model.position ? model.position.x / screen.relativeFactor + screen.xOffset : 0 y: model.position ? model.position.y / screen.relativeFactor + screen.yOffset : 0 @@ -262,6 +265,11 @@ var newY = dragStartPosition.y + translation.y; model.position = getAbsolutePosition(Qt.point(newX, newY)); } + onActiveChanged: { + if (!active) { + screen.resetTotalSize(); + } + } } // So we can show a grabby hand cursor when hovered over diff --git a/kcm/package/contents/ui/Screen.qml b/kcm/package/contents/ui/Screen.qml --- a/kcm/package/contents/ui/Screen.qml +++ b/kcm/package/contents/ui/Screen.qml @@ -79,14 +79,6 @@ focusPolicy: Qt.NoFocus visible: kcm.outputModel && kcm.outputModel.rowCount() > 1 } - Controls.Button { - enabled: !kcm.screenNormalized - onClicked: resetTotalSize() - text: i18n("Center View") - icon.name: "zoom-original" - focusPolicy: Qt.NoFocus - visible: kcm.outputModel && kcm.outputModel.rowCount() > 1 - } } Repeater {