Commit d9533e67 authored by Björn Feber's avatar Björn Feber
Browse files

Only show panel toolbox when desktop toolbox is open

Summary:
This way the panel toolbox isn't always visible, because with D23951 we're basically always in unlocked mode.

Depends on D24239

Test Plan: Open the desktop toolbox and then the panel toolbox.

Reviewers: #plasma, #vdg, ngraham, mart

Reviewed By: #plasma, #vdg, ngraham, mart

Subscribers: mart, plasma-devel, #vdg, #plasma

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D24246
parent 7c6dcd77
......@@ -204,6 +204,8 @@ function checkLastSpacer() {
}
Plasmoid.onUserConfiguringChanged: {
containmentSizeSyncTimer.restart();
if (plasmoid.immutable) {
if (dragOverlay) {
dragOverlay.destroy();
......@@ -233,7 +235,7 @@ function checkLastSpacer() {
}
Plasmoid.onFormFactorChanged: containmentSizeSyncTimer.restart();
Plasmoid.onImmutableChanged: containmentSizeSyncTimer.restart();
Containment.onEditModeChanged: containmentSizeSyncTimer.restart();
onToolBoxChanged: {
containmentSizeSyncTimer.restart();
......@@ -419,10 +421,10 @@ function checkLastSpacer() {
interval: 150
onTriggered: {
dndSpacer.parent = root;
currentLayout.x = (isHorizontal && toolBox && Qt.application.layoutDirection === Qt.RightToLeft && !plasmoid.immutable) ? toolBox.width : 0;
currentLayout.x = (isHorizontal && toolBox && Qt.application.layoutDirection === Qt.RightToLeft && (plasmoid.editMode || plasmoid.userConfiguring)) ? toolBox.width : 0;
currentLayout.y = 0
currentLayout.width = root.width - (isHorizontal && toolBox && !plasmoid.immutable ? toolBox.width : 0)
currentLayout.height = root.height - (!isHorizontal && toolBox && !plasmoid.immutable ? toolBox.height : 0)
currentLayout.width = root.width - (isHorizontal && toolBox && (plasmoid.editMode || plasmoid.userConfiguring) ? toolBox.width : 0)
currentLayout.height = root.height - (!isHorizontal && toolBox && (plasmoid.editMode || plasmoid.userConfiguring) ? toolBox.height : 0)
currentLayout.isLayoutHorizontal = isHorizontal
}
}
......
......@@ -29,7 +29,7 @@ Item {
width: isVertical ? units.iconSizes.medium : units.iconSizes.smallMedium + units.smallSpacing * 2
height: isVertical ? units.iconSizes.smallMedium + units.smallSpacing * 2 : units.iconSizes.medium
property bool isVertical: plasmoid.formFactor === 3
opacity: plasmoid.immutable ? 0 : (mouseArea.containsMouse || plasmoid.userConfiguring ? 1 : 0.5)
opacity: plasmoid.editMode || plasmoid.userConfiguring ? (mouseArea.containsMouse || plasmoid.userConfiguring ? 1 : 0.5) : 0
z: 999
......@@ -77,7 +77,7 @@ Item {
id: mouseArea
anchors.fill: parent
hoverEnabled: enabled
enabled: !plasmoid.immutable
enabled: plasmoid.editMode || plasmoid.userConfiguring
onClicked: {
main.Plasmoid.action("configure").trigger()
}
......
Markdown is supported
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