Commit 1a10e201 authored by Nate Graham's avatar Nate Graham 🔩

[containment] Show an inline message when the Desktop Toolbox is hidden

Summary:
Currently, when the Desktop Toolbox is hidden, the only way to return to the
containment configuration window is by right-clicking on the desktop. This may
not be obvious or may be difficult for some people sue to age, disability,
hardware, etc.

This patch makes an informational message appear when the user goes to hide the
Desktop Toolbox that explains how to return to the configuration window in the
future. It only appears when the checkbox is currently checked and it is unchecked;
it does not appear when the user visits the {nav Tweaks} page when the checkbox is
already unchecked (by then they already know because they've already seen the
message at least once)

Test Plan: {F6613733, size=full}

Reviewers: #vdg, #plasma, mart

Reviewed By: #vdg, #plasma, mart

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D18991
parent 191a901d
......@@ -18,7 +18,7 @@
***************************************************************************/
import QtQuick 2.0
import QtQuick.Controls 2.0
import QtQuick.Controls 2.4
import QtQuick.Dialogs 1.1
import QtQuick.Layouts 1.0
import org.kde.kirigami 2.4 as Kirigami
......@@ -34,18 +34,43 @@ Item {
property alias cfg_showToolbox: showToolbox.checked
property alias cfg_pressToMove: pressToMove.checked
Kirigami.FormLayout {
property bool showMessage: false
CheckBox {
id: showToolbox
ColumnLayout {
text: i18n("Show the desktop toolbox")
Kirigami.InlineMessage {
visible: showMessage || animating
text: i18nd("plasma_shell_org.kde.plasma.desktop", "With the Desktop Toolbox hidden, right-click on the desktop and choose 'Configure Desktop...' to access this configuration window in the future")
Layout.fillWidth: true
Layout.leftMargin: Kirigami.Units.smallSpacing
Layout.rightMargin: Kirigami.Units.smallSpacing
}
CheckBox {
id: pressToMove
Kirigami.FormLayout {
text: i18n("Press and hold widgets to move them and reveal their handles")
CheckBox {
id: showToolbox
text: i18n("Show the desktop toolbox")
// Only show the message when the user actively unchecks it, not if it's
// already unchecked
nextCheckState: function() {
if (checkState === Qt.Checked) {
showMessage = true
return Qt.Unhecked
} else {
showMessage = false
return Qt.Checked
}
}
}
CheckBox {
id: pressToMove
text: i18n("Press and hold widgets to move them and reveal their handles")
}
}
}
}
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