Commit 69d649e5 authored by Nate Graham's avatar Nate Graham 🔩
Browse files

[containments/desktop] Delete the "Tweaks" page and its options

With the new global edit mode, both of the options on the Tweaks page become unnecessary:
- The option to hide the toolbox becomes dangerous because it breaks global edit mode
- The option to toggle press-and-hold is unnecessary with the far superior global edit mode

Test Plan:
- Right-click desktop > Configure Desktop > No "Tweaks" page at the bottom of the list: {F7687032}
- Widget moving, resizing, and editing behaviors in side and out of edit mode are unchanged
- You can no longer turn off the toolbox and break edit mode
- You can no longer toggle the press-and-hold checkbox to show widget handles by hovering over widgets for a few seconds

Reviewers: mart, GB_2, #plasma, hein

Reviewed By: mart, #plasma

Subscribers: fabianr, broulik, plasma-devel

Tags: #plasma

Maniphest Tasks: T10402

Differential Revision:
parent cf7254a7
......@@ -45,11 +45,4 @@ ConfigModel {
source: "ConfigFilter.qml"
visible: isFolder
ConfigCategory {
name: i18n("Tweaks")
icon: "preferences-other"
source: "ConfigTweaks.qml"
visible: plasmoid.configuration.showTweaks && ("containmentType" in plasmoid)
......@@ -131,22 +131,5 @@
<label>List of MIME types to filter by.</label>
<entry name="showTweaks" type="Bool">
<label>Whether to show the "Tweaks" config page. Only used when serving as containment.</label>
<entry name="showToolbox" type="Bool">
<label>Whether to show the Desktop Toolbox. Only used when serving as containment.</label>
<entry name="pressToMove" type="Bool">
<label>Whether to activate widget handles and widget move mode by long press. Only used when serving as containment.</label>
<entry name="pressToMoveHelp" type="Bool">
<label>Whether to show an info notification about pressToMove mode after enabling it or when the containment becomes mutable (i.e. widgets are unlocked).</label>
* Copyright (C) 2014 by Eike Hein <> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . *
import QtQuick 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
import org.kde.plasma.plasmoid 2.0
Item {
id: configExperimental
width: childrenRect.width
height: childrenRect.height
property alias cfg_showToolbox: showToolbox.checked
property alias cfg_pressToMove: pressToMove.checked
property bool showMessage: false
ColumnLayout {
Kirigami.InlineMessage {
visible: showMessage || animating
text: i18nd("plasma_applet_org.kde.desktopcontainment", "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
Kirigami.FormLayout {
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")
......@@ -239,50 +239,6 @@ FolderViewDropArea {
CompactRepresentation { folderView: folderViewLayer.view }
Connections {
target: plasmoid
ignoreUnknownSignals: true
onImmutableChanged: {
if (root.isContainment && !plasmoid.immutable) {;
Connections {
target: plasmoid.configuration
onPressToMoveChanged: {
if (plasmoid.configuration.pressToMove && plasmoid.configuration.pressToMoveHelp && !plasmoid.immutable) {;
Binding {
target: toolBox
property: "visible"
value: plasmoid.configuration.showToolbox
Desktop.InfoNotification {
id: pressToMoveHelp
enabled: plasmoid.configuration.pressToMove && plasmoid.configuration.pressToMoveHelp
iconName: "plasma"
titleText: i18n("Widgets unlocked")
text: i18n("You can press and hold widgets to move them and reveal their handles.")
acknowledgeActionText: i18n("Got it")
onAcknowledged: {
plasmoid.configuration.pressToMoveHelp = false;
PlasmaCore.FrameSvgItem {
id : highlightItemSvg
......@@ -346,7 +302,7 @@ FolderViewDropArea {
id: appletContainer
editModeCondition: plasmoid.immutable
? ContainmentLayoutManager.ItemContainer.Locked
: (plasmoid.configuration.pressToMove ? ContainmentLayoutManager.ItemContainer.AfterPressAndHold : ContainmentLayoutManager.ItemContainer.AfterMouseOver)
: ContainmentLayoutManager.ItemContainer.AfterPressAndHold
configOverlayComponent: ConfigOverlay {}
onUserDrag: {
var pos = mapToItem(root.parent, dragCenter.x, dragCenter.y);
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