Warning, /plasma/plasma-desktop/applets/taskmanager/package/contents/ui/ConfigBehavior.qml is written in an unsupported language. File is not indexed.
0001 /*
0002 SPDX-FileCopyrightText: 2013 Eike Hein <hein@kde.org>
0003
0004 SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006
0007 import QtQuick 2.15
0008 import QtQuick.Controls 2.15
0009 import QtQuick.Layouts 1.15
0010
0011 import org.kde.kirigami 2.19 as Kirigami
0012 import org.kde.plasma.core as PlasmaCore
0013 import org.kde.plasma.plasmoid 2.0
0014 import org.kde.kcmutils as KCM
0015
0016 import org.kde.plasma.private.taskmanager 0.1 as TaskManagerApplet
0017
0018 KCM.SimpleKCM {
0019 property alias cfg_groupingStrategy: groupingStrategy.currentIndex
0020 property alias cfg_groupedTaskVisualization: groupedTaskVisualization.currentIndex
0021 property alias cfg_groupPopups: groupPopups.checked
0022 property alias cfg_onlyGroupWhenFull: onlyGroupWhenFull.checked
0023 property alias cfg_sortingStrategy: sortingStrategy.currentIndex
0024 property alias cfg_separateLaunchers: separateLaunchers.checked
0025 property alias cfg_middleClickAction: middleClickAction.currentIndex
0026 property alias cfg_wheelEnabled: wheelEnabled.checked
0027 property alias cfg_wheelSkipMinimized: wheelSkipMinimized.checked
0028 property alias cfg_showOnlyCurrentScreen: showOnlyCurrentScreen.checked
0029 property alias cfg_showOnlyCurrentDesktop: showOnlyCurrentDesktop.checked
0030 property alias cfg_showOnlyCurrentActivity: showOnlyCurrentActivity.checked
0031 property alias cfg_showOnlyMinimized: showOnlyMinimized.checked
0032 property alias cfg_minimizeActiveTaskOnClick: minimizeActive.checked
0033 property alias cfg_unhideOnAttention: unhideOnAttention.checked
0034 property alias cfg_reverseMode: reverseMode.checked
0035
0036 TaskManagerApplet.Backend {
0037 id: backend
0038 }
0039
0040 Kirigami.FormLayout {
0041 anchors.left: parent.left
0042 anchors.right: parent.right
0043
0044 ComboBox {
0045 id: groupingStrategy
0046 Kirigami.FormData.label: i18n("Group:")
0047 Layout.fillWidth: true
0048 Layout.minimumWidth: Kirigami.Units.gridUnit * 14
0049 model: [i18n("Do not group"), i18n("By program name")]
0050 }
0051
0052 ComboBox {
0053 id: groupedTaskVisualization
0054 Kirigami.FormData.label: i18n("Clicking grouped task:")
0055 Layout.fillWidth: true
0056 Layout.minimumWidth: Kirigami.Units.gridUnit * 14
0057
0058 enabled: groupingStrategy.currentIndex !== 0
0059
0060 model: [
0061 i18nc("Completes the sentence 'Clicking grouped task cycles through tasks' ", "Cycles through tasks"),
0062 i18nc("Completes the sentence 'Clicking grouped task shows tooltip window thumbnails' ", "Shows small window previews"),
0063 i18nc("Completes the sentence 'Clicking grouped task shows windows side by side' ", "Shows large window previews"),
0064 i18nc("Completes the sentence 'Clicking grouped task shows textual list' ", "Shows textual list"),
0065 ]
0066 }
0067 // "You asked for Window View but Window View is not available" message
0068 Kirigami.InlineMessage {
0069 Layout.fillWidth: true
0070 visible: groupedTaskVisualization.currentIndex === 2 && !backend.windowViewAvailable
0071 type: Kirigami.MessageType.Warning
0072 text: i18n("The compositor does not support displaying windows side by side, so a textual list will be displayed instead.")
0073 }
0074
0075 Item {
0076 Kirigami.FormData.isSection: true
0077 }
0078
0079 CheckBox {
0080 id: groupPopups
0081 visible: (Plasmoid.pluginName !== "org.kde.plasma.icontasks")
0082 text: i18n("Combine into single button")
0083 enabled: groupingStrategy.currentIndex > 0
0084 }
0085
0086 CheckBox {
0087 id: onlyGroupWhenFull
0088 visible: (Plasmoid.pluginName !== "org.kde.plasma.icontasks")
0089 text: i18n("Group only when the Task Manager is full")
0090 enabled: groupingStrategy.currentIndex > 0 && groupPopups.checked
0091 }
0092
0093 Item {
0094 Kirigami.FormData.isSection: true
0095 visible: (Plasmoid.pluginName !== "org.kde.plasma.icontasks")
0096 }
0097
0098 ComboBox {
0099 id: sortingStrategy
0100 Kirigami.FormData.label: i18n("Sort:")
0101 Layout.fillWidth: true
0102 Layout.minimumWidth: Kirigami.Units.gridUnit * 14
0103 model: [i18n("Do not sort"), i18n("Manually"), i18n("Alphabetically"), i18n("By desktop"), i18n("By activity")]
0104 }
0105
0106 CheckBox {
0107 id: separateLaunchers
0108 visible: (Plasmoid.pluginName !== "org.kde.plasma.icontasks")
0109 text: i18n("Keep launchers separate")
0110 enabled: sortingStrategy.currentIndex == 1
0111 }
0112
0113 Item {
0114 Kirigami.FormData.isSection: true
0115 visible: (Plasmoid.pluginName !== "org.kde.plasma.icontasks")
0116 }
0117
0118 CheckBox {
0119 id: minimizeActive
0120 Kirigami.FormData.label: i18nc("Part of a sentence: 'Clicking active task minimizes the task'", "Clicking active task:")
0121 text: i18nc("Part of a sentence: 'Clicking active task minimizes the task'", "Minimizes the task")
0122 }
0123
0124 ComboBox {
0125 id: middleClickAction
0126 Kirigami.FormData.label: i18n("Middle-clicking any task:")
0127 Layout.fillWidth: true
0128 Layout.minimumWidth: Kirigami.Units.gridUnit * 14
0129 model: [
0130 i18nc("Part of a sentence: 'Middle-clicking any task does nothing'", "Does nothing"),
0131 i18nc("Part of a sentence: 'Middle-clicking any task closes window or group'", "Closes window or group"),
0132 i18nc("Part of a sentence: 'Middle-clicking any task opens a new window'", "Opens a new window"),
0133 i18nc("Part of a sentence: 'Middle-clicking any task minimizes/restores window or group'", "Minimizes/Restores window or group"),
0134 i18nc("Part of a sentence: 'Middle-clicking any task toggles grouping'", "Toggles grouping"),
0135 i18nc("Part of a sentence: 'Middle-clicking any task brings it to the current virtual desktop'", "Brings it to the current virtual desktop")
0136 ]
0137 }
0138
0139 Item {
0140 Kirigami.FormData.isSection: true
0141 }
0142
0143 CheckBox {
0144 id: wheelEnabled
0145 Kirigami.FormData.label: i18nc("Part of a sentence: 'Mouse wheel cycles through tasks'", "Mouse wheel:")
0146 text: i18nc("Part of a sentence: 'Mouse wheel cycles through tasks'", "Cycles through tasks")
0147 }
0148
0149 RowLayout {
0150 // HACK: Workaround for Kirigami bug 434625
0151 // due to which a simple Layout.leftMargin on CheckBox doesn't work
0152 Item { implicitWidth: Kirigami.Units.gridUnit }
0153 CheckBox {
0154 id: wheelSkipMinimized
0155 text: i18n("Skip minimized tasks")
0156 enabled: wheelEnabled.checked
0157 }
0158 }
0159
0160 Item {
0161 Kirigami.FormData.isSection: true
0162 }
0163
0164 CheckBox {
0165 id: showOnlyCurrentScreen
0166 Kirigami.FormData.label: i18n("Show only tasks:")
0167 text: i18n("From current screen")
0168 }
0169
0170 CheckBox {
0171 id: showOnlyCurrentDesktop
0172 text: i18n("From current desktop")
0173 }
0174
0175 CheckBox {
0176 id: showOnlyCurrentActivity
0177 text: i18n("From current activity")
0178 }
0179
0180 CheckBox {
0181 id: showOnlyMinimized
0182 text: i18n("That are minimized")
0183 }
0184
0185 Item {
0186 Kirigami.FormData.isSection: true
0187 }
0188
0189 CheckBox {
0190 id: unhideOnAttention
0191 Kirigami.FormData.label: i18n("When panel is hidden:")
0192 text: i18n("Unhide when a window wants attention")
0193 }
0194
0195 Item {
0196 Kirigami.FormData.isSection: true
0197 }
0198
0199 ButtonGroup {
0200 id: reverseModeRadioButtonGroup
0201 }
0202
0203 RadioButton {
0204 Kirigami.FormData.label: i18n("New tasks appear:")
0205 checked: !reverseMode.checked
0206 text: {
0207 if (Plasmoid.formFactor === PlasmaCore.Types.Vertical) {
0208 return i18n("On the bottom")
0209 }
0210 // horizontal
0211 if (Qt.application.layoutDirection === Qt.LeftToRight) {
0212 return i18n("To the right");
0213 } else {
0214 return i18n("To the left")
0215 }
0216 }
0217 ButtonGroup.group: reverseModeRadioButtonGroup
0218 visible: reverseMode.visible
0219 }
0220
0221 RadioButton {
0222 id: reverseMode
0223 checked: Plasmoid.configuration.reverseMode === true
0224 text: {
0225 if (Plasmoid.formFactor === PlasmaCore.Types.Vertical) {
0226 return i18n("On the Top")
0227 }
0228 // horizontal
0229 if (Qt.application.layoutDirection === Qt.LeftToRight) {
0230 return i18n("To the left");
0231 } else {
0232 return i18n("To the right");
0233 }
0234 }
0235 ButtonGroup.group: reverseModeRadioButtonGroup
0236 }
0237
0238 }
0239 }