fixes for reversed state of config window

pull/5/head
Michail Vourlakos 6 years ago
parent 67f6c85387
commit 10ee2d9ab8

@ -566,7 +566,7 @@ Item {
property bool rectangled: canBeHovered && !lockZoom
ShortcutBadge{
// anchors.fill: wrapper
anchors.fill: parent
}
}
}

@ -36,8 +36,24 @@ import "private" as Private
Item {
id: item
Layout.rightMargin: {
if (level === 1) {
return Qt.application.layoutDirection === Qt.RightToLeft ? 0 : 2 * units.smallSpacing
}
return 0;
}
Layout.leftMargin: {
if (level === 1) {
return Qt.application.layoutDirection === Qt.RightToLeft ? 2 * units.smallSpacing : 0
}
return 0;
}
property int level:1
property bool checked: false
property bool isFirstSubCategory: false
readonly property int implicitWidth: row.width
@ -73,6 +89,7 @@ Item {
text: item.text
enabled: item.checked
visible: level === 2
isFirstSubCategory: item.isFirstSubCategory
}
PlasmaComponents.Label {

@ -515,7 +515,6 @@ PlasmaComponents.Page {
//! BEGIN: Actions
ColumnLayout {
spacing: units.smallSpacing
Layout.rightMargin: units.smallSpacing * 2
visible: dialog.expertLevel
LatteComponents.Header {
@ -524,6 +523,7 @@ PlasmaComponents.Page {
ColumnLayout {
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing * 2
spacing: 0
LatteComponents.SubHeader {
@ -613,7 +613,7 @@ PlasmaComponents.Page {
//! BEGIN: Adjust
ColumnLayout {
spacing: units.smallSpacing
Layout.rightMargin: units.smallSpacing * 2
visible: dialog.expertLevel
enabled: latteView.visibility.mode !== Latte.Types.AlwaysVisible && latteView.visibility.mode !== Latte.Types.WindowsGoBelow
@ -621,46 +621,49 @@ PlasmaComponents.Page {
text: i18n("Environment")
}
PlasmaComponents.CheckBox {
ColumnLayout {
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Activate KWin edge after hiding")
checked: latteView.visibility.enableKWinEdges
tooltip: i18n("After the view becomes hidden, KWin is informed to track user feedback. For example an edge visual hint is shown whenever the mouse approaches the hidden view")
Layout.rightMargin: units.smallSpacing * 2
spacing: 0
onClicked: {
latteView.visibility.enableKWinEdges = checked;
PlasmaComponents.CheckBox {
text: i18n("Activate KWin edge after hiding")
checked: latteView.visibility.enableKWinEdges
tooltip: i18n("After the view becomes hidden, KWin is informed to track user feedback. For example an edge visual hint is shown whenever the mouse approaches the hidden view")
onClicked: {
latteView.visibility.enableKWinEdges = checked;
}
}
}
PlasmaComponents.CheckBox {
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Can be above fullscreen windows")
checked: latteView.byPassWM
PlasmaComponents.CheckBox {
text: i18n("Can be above fullscreen windows")
checked: latteView.byPassWM
tooltip: i18n("BypassWindowManagerHint flag for the window. The view will be above all windows even those set as 'Always On Top'")
tooltip: i18n("BypassWindowManagerHint flag for the window. The view will be above all windows even those set as 'Always On Top'")
onCheckedChanged: {
latteView.byPassWM = checked;
onCheckedChanged: {
latteView.byPassWM = checked;
}
}
}
PlasmaComponents.CheckBox {
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Raise on desktop change")
checked: latteView.visibility.raiseOnDesktop
PlasmaComponents.CheckBox {
text: i18n("Raise on desktop change")
checked: latteView.visibility.raiseOnDesktop
onClicked: {
latteView.visibility.raiseOnDesktop = checked
onClicked: {
latteView.visibility.raiseOnDesktop = checked
}
}
}
PlasmaComponents.CheckBox {
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Raise on activity change")
checked: latteView.visibility.raiseOnActivity
PlasmaComponents.CheckBox {
text: i18n("Raise on activity change")
checked: latteView.visibility.raiseOnActivity
onClicked: {
latteView.visibility.raiseOnActivity = checked
onClicked: {
latteView.visibility.raiseOnActivity = checked
}
}
}
}

@ -49,7 +49,7 @@ PlasmaComponents.Page {
ColumnLayout {
Layout.fillWidth: true
Layout.topMargin: units.smallSpacing
Layout.rightMargin: units.smallSpacing * 2
spacing: units.smallSpacing
LatteComponents.HeaderSwitch {
@ -73,6 +73,8 @@ PlasmaComponents.Page {
ColumnLayout {
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing * 2
spacing: 0
RowLayout{
enabled: showAppletShadow.checked
@ -167,135 +169,134 @@ PlasmaComponents.Page {
Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4
}
}
}
LatteComponents.SubHeader {
isFirstSubCategory: true
text: i18n("Color")
}
LatteComponents.SubHeader {
isFirstSubCategory: true
text: i18n("Color")
}
RowLayout {
id: shadowColorRow
Layout.fillWidth: true
Layout.leftMargin: units.smallSpacing * 2
spacing: 2
enabled: showAppletShadow.checked
RowLayout {
id: shadowColorRow
Layout.fillWidth: true
spacing: 2
enabled: showAppletShadow.checked
readonly property string defaultShadow: "080808"
readonly property string themeShadow: {
var strC = String(theme.textColor);
readonly property string defaultShadow: "080808"
readonly property string themeShadow: {
var strC = String(theme.textColor);
return strC.indexOf("#") === 0 ? strC.substr(1) : strC;
}
return strC.indexOf("#") === 0 ? strC.substr(1) : strC;
}
ExclusiveGroup {
id: shadowColorGroup
ExclusiveGroup {
id: shadowColorGroup
property bool inStartup: true
property bool inStartup: true
onCurrentChanged: {
if (inStartup) {
return;
}
onCurrentChanged: {
if (inStartup) {
return;
}
if (current === defaultShadowBtn) {
plasmoid.configuration.shadowColorType = Latte.Types.DefaultColorShadow;
} else if (current === themeShadowBtn) {
plasmoid.configuration.shadowColorType = Latte.Types.ThemeColorShadow;
} else if (current === userShadowBtn) {
plasmoid.configuration.shadowColorType = Latte.Types.UserColorShadow;
if (current === defaultShadowBtn) {
plasmoid.configuration.shadowColorType = Latte.Types.DefaultColorShadow;
} else if (current === themeShadowBtn) {
plasmoid.configuration.shadowColorType = Latte.Types.ThemeColorShadow;
} else if (current === userShadowBtn) {
plasmoid.configuration.shadowColorType = Latte.Types.UserColorShadow;
}
}
}
Component.onCompleted: inStartup = false;
}
Component.onCompleted: inStartup = false;
}
PlasmaComponents.Button {
id: defaultShadowBtn
Layout.fillWidth: true
PlasmaComponents.Button {
id: defaultShadowBtn
Layout.fillWidth: true
text: i18nc("default shadow", "Default")
checked: plasmoid.configuration.shadowColorType === Latte.Types.DefaultColorShadow
checkable: true
exclusiveGroup: shadowColorGroup
tooltip: i18n("Default shadow for applets")
}
text: i18nc("default shadow", "Default")
checked: plasmoid.configuration.shadowColorType === Latte.Types.DefaultColorShadow
checkable: true
exclusiveGroup: shadowColorGroup
tooltip: i18n("Default shadow for applets")
}
PlasmaComponents.Button {
id: themeShadowBtn
Layout.fillWidth: true
PlasmaComponents.Button {
id: themeShadowBtn
Layout.fillWidth: true
text: i18nc("theme shadow", "Theme")
checked: plasmoid.configuration.shadowColorType === Latte.Types.ThemeColorShadow
checkable: true
exclusiveGroup: shadowColorGroup
tooltip: i18n("Shadow from theme color palette")
}
text: i18nc("theme shadow", "Theme")
checked: plasmoid.configuration.shadowColorType === Latte.Types.ThemeColorShadow
checkable: true
exclusiveGroup: shadowColorGroup
tooltip: i18n("Shadow from theme color palette")
}
//overlayed button
PlasmaComponents.Button {
id: userShadowBtn
Layout.fillWidth: true
height: parent.height
text: " "
//overlayed button
PlasmaComponents.Button {
id: userShadowBtn
Layout.fillWidth: true
height: parent.height
text: " "
checkable: true
checked: plasmoid.configuration.shadowColorType === Latte.Types.UserColorShadow
tooltip: i18n("Use set shadow color")
exclusiveGroup: shadowColorGroup
checkable: true
checked: plasmoid.configuration.shadowColorType === Latte.Types.UserColorShadow
tooltip: i18n("Use set shadow color")
exclusiveGroup: shadowColorGroup
Rectangle{
anchors.fill: parent
anchors.margins: 1.5*units.smallSpacing
Rectangle{
anchors.fill: parent
anchors.margins: 1.5*units.smallSpacing
color: "#" + plasmoid.configuration.shadowColor;
color: "#" + plasmoid.configuration.shadowColor;
opacity: shadowColorRow.enabled ? 1 : 0.6
opacity: shadowColorRow.enabled ? 1 : 0.6
Rectangle{
anchors.fill: parent
color: "transparent"
border.width: 1
border.color: theme.textColor
opacity: parent.opacity - 0.4
}
Rectangle{
anchors.fill: parent
color: "transparent"
border.width: 1
border.color: theme.textColor
opacity: parent.opacity - 0.4
}
MouseArea{
anchors.fill: parent
onClicked: {
shadowColorGroup.current = userShadowBtn;
viewConfig.setSticker(true);
colorDialogLoader.showDialog = true;
MouseArea{
anchors.fill: parent
onClicked: {
shadowColorGroup.current = userShadowBtn;
viewConfig.setSticker(true);
colorDialogLoader.showDialog = true;
}
}
}
}
Loader{
id:colorDialogLoader
property bool showDialog: false
active: showDialog
Loader{
id:colorDialogLoader
property bool showDialog: false
active: showDialog
sourceComponent: ColorDialog {
title: i18n("Please choose shadow color")
showAlphaChannel: false
sourceComponent: ColorDialog {
title: i18n("Please choose shadow color")
showAlphaChannel: false
onAccepted: {
//console.log("You chose: " + String(color));
var strC = String(color);
if (strC.indexOf("#") === 0) {
plasmoid.configuration.shadowColor = strC.substr(1);
}
onAccepted: {
//console.log("You chose: " + String(color));
var strC = String(color);
if (strC.indexOf("#") === 0) {
plasmoid.configuration.shadowColor = strC.substr(1);
}
colorDialogLoader.showDialog = false;
viewConfig.setSticker(false);
}
onRejected: {
colorDialogLoader.showDialog = false;
viewConfig.setSticker(false);
}
Component.onCompleted: {
color = String("#" + plasmoid.configuration.shadowColor);
visible = true;
colorDialogLoader.showDialog = false;
viewConfig.setSticker(false);
}
onRejected: {
colorDialogLoader.showDialog = false;
viewConfig.setSticker(false);
}
Component.onCompleted: {
color = String("#" + plasmoid.configuration.shadowColor);
visible = true;
}
}
}
}
@ -308,7 +309,6 @@ PlasmaComponents.Page {
ColumnLayout {
Layout.fillWidth: true
Layout.topMargin: units.smallSpacing
Layout.rightMargin: units.smallSpacing * 2
spacing: units.smallSpacing
LatteComponents.HeaderSwitch {
@ -327,18 +327,18 @@ PlasmaComponents.Page {
}
ColumnLayout {
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing * 2
spacing: 0
enabled: plasmoid.configuration.animationsEnabled
LatteComponents.SubHeader {
Layout.leftMargin: units.smallSpacing * 2
isFirstSubCategory: true
text: i18n("Speed")
}
ColumnLayout {
Layout.fillWidth: true
Layout.leftMargin: units.smallSpacing * 2
spacing: 0
RowLayout {
@ -385,11 +385,10 @@ PlasmaComponents.Page {
}
ColumnLayout {
spacing: units.smallSpacing
spacing: 0
visible: latteView.latteTasksArePresent
LatteComponents.SubHeader {
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Tasks")
}
@ -446,7 +445,6 @@ PlasmaComponents.Page {
//! BEGIN: Active Indicator General Settings
ColumnLayout{
spacing: units.smallSpacing
Layout.rightMargin: units.smallSpacing * 2
LatteComponents.HeaderSwitch {
id: indicatorsSwitch
@ -464,6 +462,7 @@ PlasmaComponents.Page {
ColumnLayout {
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing * 2
spacing: units.smallSpacing
enabled: indicatorsSwitch.checked
@ -613,7 +612,6 @@ PlasmaComponents.Page {
ColumnLayout {
Layout.fillWidth: true
Layout.topMargin: units.smallSpacing
Layout.rightMargin: units.smallSpacing
spacing: units.smallSpacing
visible: latteView.indicator.providesConfigUi
enabled: latteView.indicator.enabled
@ -626,6 +624,7 @@ PlasmaComponents.Page {
id: indicatorSpecificOptions
Layout.fillWidth: true
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing
spacing: 0
Component.onCompleted: {

@ -50,55 +50,56 @@ PlasmaComponents.Page {
ColumnLayout {
spacing: units.smallSpacing
Layout.topMargin: units.smallSpacing
Layout.rightMargin: units.smallSpacing * 2
visible: dialog.highLevel
LatteComponents.Header {
text: i18n("Badges")
}
PlasmaComponents.CheckBox {
ColumnLayout{
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Unread messages from tasks")
checked: plasmoid.configuration.showInfoBadge
tooltip: i18n("Show unread messages or information from tasks")
Layout.rightMargin: units.smallSpacing * 2
spacing: 0
onClicked: {
plasmoid.configuration.showInfoBadge = checked
PlasmaComponents.CheckBox {
text: i18n("Unread messages from tasks")
checked: plasmoid.configuration.showInfoBadge
tooltip: i18n("Show unread messages or information from tasks")
onClicked: {
plasmoid.configuration.showInfoBadge = checked
}
}
}
PlasmaComponents.CheckBox {
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Progress information for tasks")
checked: plasmoid.configuration.showProgressBadge
tooltip: i18n("Show a progress animation for tasks e.g. when copying files with Dolphin")
PlasmaComponents.CheckBox {
text: i18n("Progress information for tasks")
checked: plasmoid.configuration.showProgressBadge
tooltip: i18n("Show a progress animation for tasks e.g. when copying files with Dolphin")
onClicked: {
plasmoid.configuration.showProgressBadge = checked
onClicked: {
plasmoid.configuration.showProgressBadge = checked
}
}
}
PlasmaComponents.CheckBox {
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Audio playing from tasks")
checked: plasmoid.configuration.showAudioBadge
tooltip: i18n("Show audio playing from tasks")
PlasmaComponents.CheckBox {
text: i18n("Audio playing from tasks")
checked: plasmoid.configuration.showAudioBadge
tooltip: i18n("Show audio playing from tasks")
onClicked: {
plasmoid.configuration.showAudioBadge = checked
onClicked: {
plasmoid.configuration.showAudioBadge = checked
}
}
}
PlasmaComponents.CheckBox {
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Change volume when scrolling audio badge")
checked: plasmoid.configuration.audioBadgeActionsEnabled
enabled: plasmoid.configuration.showAudioBadge
tooltip: i18n("The user is able to mute/unmute with click or change the volume with mouse wheel")
PlasmaComponents.CheckBox {
text: i18n("Change volume when scrolling audio badge")
checked: plasmoid.configuration.audioBadgeActionsEnabled
enabled: plasmoid.configuration.showAudioBadge
tooltip: i18n("The user is able to mute/unmute with click or change the volume with mouse wheel")
onClicked: {
plasmoid.configuration.audioBadgeActionsEnabled = checked
onClicked: {
plasmoid.configuration.audioBadgeActionsEnabled = checked
}
}
}
}
@ -107,47 +108,50 @@ PlasmaComponents.Page {
//! BEGIN: Tasks Interaction
ColumnLayout {
spacing: units.smallSpacing
Layout.rightMargin: units.smallSpacing * 2
LatteComponents.Header {
text: i18n("Interaction")
}
PlasmaComponents.CheckBox {
ColumnLayout {
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Add launchers only in the Tasks Area")
checked: plasmoid.configuration.addLaunchersInTaskManager
tooltip: i18n("Launchers are added only in the taskmanager and not as plasma applets")
Layout.rightMargin: units.smallSpacing * 2
spacing: 0
onClicked: {
plasmoid.configuration.addLaunchersInTaskManager = checked;
PlasmaComponents.CheckBox {
text: i18n("Add launchers only in the Tasks Area")
checked: plasmoid.configuration.addLaunchersInTaskManager
tooltip: i18n("Launchers are added only in the taskmanager and not as plasma applets")
onClicked: {
plasmoid.configuration.addLaunchersInTaskManager = checked;
}
}
}
PlasmaComponents.CheckBox {
id: windowActionsChk
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Show window actions in the context menu")
checked: plasmoid.configuration.showWindowActions
visible: dialog.highLevel
enabled: !disableAllWindowsFunctionality
PlasmaComponents.CheckBox {
id: windowActionsChk
text: i18n("Show window actions in the context menu")
checked: plasmoid.configuration.showWindowActions
visible: dialog.highLevel
enabled: !disableAllWindowsFunctionality
onClicked: {
plasmoid.configuration.showWindowActions = checked
onClicked: {
plasmoid.configuration.showWindowActions = checked
}
}
}
PlasmaComponents.CheckBox {
id: unifyGlobalShortcutsChk
Layout.leftMargin: units.smallSpacing * 2
text: i18n("🅰 Based on position shortcuts apply only for tasks")
checked: !plasmoid.configuration.unifiedGlobalShortcuts
tooltip: i18n("Based on position global shortcuts are enabled only for tasks and not for applets")
visible: dialog.highLevel
enabled: latteView.isPreferredForShortcuts || (!latteView.managedLayout.preferredForShortcutsTouched && latteView.isHighestPriorityView())
PlasmaComponents.CheckBox {
id: unifyGlobalShortcutsChk
text: i18n("🅰 Based on position shortcuts apply only for tasks")
checked: !plasmoid.configuration.unifiedGlobalShortcuts
tooltip: i18n("Based on position global shortcuts are enabled only for tasks and not for applets")
visible: dialog.highLevel
enabled: latteView.isPreferredForShortcuts || (!latteView.managedLayout.preferredForShortcutsTouched && latteView.isHighestPriorityView())
onClicked: {
plasmoid.configuration.unifiedGlobalShortcuts = !checked
onClicked: {
plasmoid.configuration.unifiedGlobalShortcuts = !checked
}
}
}
}
@ -156,67 +160,70 @@ PlasmaComponents.Page {
//! BEGIN: Tasks Filters
ColumnLayout {
spacing: units.smallSpacing
Layout.rightMargin: units.smallSpacing * 2
LatteComponents.Header {
text: i18n("Filters")
}
PlasmaComponents.CheckBox {
id: showOnlyCurrentScreen
ColumnLayout {
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Show only tasks from the current screen")
checked: plasmoid.configuration.showOnlyCurrentScreen
Layout.rightMargin: units.smallSpacing * 2
spacing: 0
onClicked: {
plasmoid.configuration.showOnlyCurrentScreen = checked
PlasmaComponents.CheckBox {
id: showOnlyCurrentScreen
text: i18n("Show only tasks from the current screen")
checked: plasmoid.configuration.showOnlyCurrentScreen
onClicked: {
plasmoid.configuration.showOnlyCurrentScreen = checked
}
}
}
PlasmaComponents.CheckBox {
id: showOnlyCurrentDesktop
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Show only tasks from the current desktop")
checked: plasmoid.configuration.showOnlyCurrentDesktop
PlasmaComponents.CheckBox {
id: showOnlyCurrentDesktop
text: i18n("Show only tasks from the current desktop")
checked: plasmoid.configuration.showOnlyCurrentDesktop
onClicked: {
plasmoid.configuration.showOnlyCurrentDesktop = checked
onClicked: {
plasmoid.configuration.showOnlyCurrentDesktop = checked
}
}
}
PlasmaComponents.CheckBox {
id: showOnlyCurrentActivity
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Show only tasks from the current activity")
checked: plasmoid.configuration.showOnlyCurrentActivity
PlasmaComponents.CheckBox {
id: showOnlyCurrentActivity
text: i18n("Show only tasks from the current activity")
checked: plasmoid.configuration.showOnlyCurrentActivity
onClicked: {
plasmoid.configuration.showOnlyCurrentActivity = checked
onClicked: {
plasmoid.configuration.showOnlyCurrentActivity = checked
}
}
}
PlasmaComponents.CheckBox {
id: showWindowsOnlyFromLaunchersChk
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Show only tasks from launchers")
checked: plasmoid.configuration.showWindowsOnlyFromLaunchers
visible: dialog.highLevel
PlasmaComponents.CheckBox {
id: showWindowsOnlyFromLaunchersChk
text: i18n("Show only tasks from launchers")
checked: plasmoid.configuration.showWindowsOnlyFromLaunchers
visible: dialog.highLevel
onClicked: {
plasmoid.configuration.showWindowsOnlyFromLaunchers = checked
onClicked: {
plasmoid.configuration.showWindowsOnlyFromLaunchers = checked
}
}
}
PlasmaComponents.CheckBox {
id: groupTasksChk
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Group tasks of the same application")
checked: plasmoid.configuration.groupTasksByDefault
tooltip: i18n("By default group tasks of the same application")
visible: dialog.highLevel
PlasmaComponents.CheckBox {
id: groupTasksChk
text: i18n("Group tasks of the same application")
checked: plasmoid.configuration.groupTasksByDefault
tooltip: i18n("By default group tasks of the same application")
visible: dialog.highLevel
onClicked: {
plasmoid.configuration.groupTasksByDefault = checked
onClicked: {
plasmoid.configuration.groupTasksByDefault = checked
}
}
}
}
@ -225,67 +232,73 @@ PlasmaComponents.Page {
//! BEGIN: Launchers Group
ColumnLayout {
spacing: units.smallSpacing
Layout.rightMargin: units.smallSpacing * 2
LatteComponents.Header {
text: i18n("Launchers")
}
LatteComponents.SubHeader {
isFirstSubCategory: true
text: i18nc("launchers group", "Group");
}
RowLayout {
Layout.fillWidth: true
ColumnLayout {
Layout.leftMargin: units.smallSpacing * 2
spacing: 2
Layout.rightMargin: units.smallSpacing * 2
spacing: 0
LatteComponents.SubHeader {
isFirstSubCategory: true
text: i18nc("launchers group", "Group");
}
RowLayout {
Layout.fillWidth: true
property int group: plasmoid.configuration.launchersGroup
spacing: 2
ExclusiveGroup {
id: launchersGroup
onCurrentChanged: {
if (current.checked) {
viewConfig.updateLaunchersForGroup(current.group);
plasmoid.configuration.launchersGroup = current.group;
property int group: plasmoid.configuration.launchersGroup
ExclusiveGroup {
id: launchersGroup
onCurrentChanged: {
if (current.checked) {
viewConfig.updateLaunchersForGroup(current.group);
plasmoid.configuration.launchersGroup = current.group;
}
}
}
}
PlasmaComponents.Button {
Layout.fillWidth: true
text: i18nc("unique launchers group","Unique")
checked: parent.group === group
checkable: true
exclusiveGroup: launchersGroup
tooltip: i18n("Use a unique set of launchers for this view which is independent from any other view")
PlasmaComponents.Button {
Layout.fillWidth: true
text: i18nc("unique launchers group","Unique")
checked: parent.group === group
checkable: true
exclusiveGroup: launchersGroup
tooltip: i18n("Use a unique set of launchers for this view which is independent from any other view")
readonly property int group: Latte.Types.UniqueLaunchers
}
readonly property int group: Latte.Types.UniqueLaunchers
}
PlasmaComponents.Button {
Layout.fillWidth: true
text: i18nc("layout launchers group","Layout")
checked: parent.group === group
checkable: true
exclusiveGroup: launchersGroup
tooltip: i18n("Use the current layout set of launchers for this latteView. This group provides launchers <b>synchronization</b> between different views in the <b>same layout</b>")
//! it is shown only when the user has activated that option manually from the text layout file
visible: plasmoid.configuration.launchersGroup === group
readonly property int group: Latte.Types.LayoutLaunchers
}
PlasmaComponents.Button {
Layout.fillWidth: true
text: i18nc("layout launchers group","Layout")
checked: parent.group === group
checkable: true
exclusiveGroup: launchersGroup
tooltip: i18n("Use the current layout set of launchers for this latteView. This group provides launchers <b>synchronization</b> between different views in the <b>same layout</b>")
//! it is shown only when the user has activated that option manually from the text layout file
visible: plasmoid.configuration.launchersGroup === group
readonly property int group: Latte.Types.LayoutLaunchers
}
PlasmaComponents.Button {
Layout.fillWidth: true
text: i18nc("global launchers group","Global")
checked: parent.group === group
checkable: true
exclusiveGroup: launchersGroup
tooltip: i18n("Use the global set of launchers for this latteView. This group provides launchers <b>synchronization</b> between different views and between <b>different layouts</b>")
PlasmaComponents.Button {
Layout.fillWidth: true
text: i18nc("global launchers group","Global")
checked: parent.group === group
checkable: true
exclusiveGroup: launchersGroup
tooltip: i18n("Use the global set of launchers for this latteView. This group provides launchers <b>synchronization</b> between different views and between <b>different layouts</b>")
readonly property int group: Latte.Types.GlobalLaunchers
readonly property int group: Latte.Types.GlobalLaunchers
}
}
}
}
@ -294,175 +307,178 @@ PlasmaComponents.Page {
//! BEGIN: Actions
ColumnLayout {
spacing: units.smallSpacing
Layout.rightMargin: units.smallSpacing * 2
visible: dialog.expertLevel
LatteComponents.Header {
text: i18n("Actions")
}
GridLayout {
columns: 2
ColumnLayout {
Layout.leftMargin: units.smallSpacing * 2
Layout.topMargin: units.smallSpacing
enabled: !disableAllWindowsFunctionality
Layout.rightMargin: units.smallSpacing * 2
spacing: 0
PlasmaComponents.Label {
text: i18n("Left Click")
}
GridLayout {
columns: 2
LatteComponents.ComboBox {
id: leftClickAction
Layout.fillWidth: true
model: [i18nc("present windows action", "Present Windows"),
i18n("Cycle Through Tasks"),
i18n("Preview Windows")]
Layout.topMargin: units.smallSpacing
enabled: !disableAllWindowsFunctionality
PlasmaComponents.Label {
text: i18n("Left Click")
}
LatteComponents.ComboBox {
id: leftClickAction
Layout.fillWidth: true
model: [i18nc("present windows action", "Present Windows"),
i18n("Cycle Through Tasks"),
i18n("Preview Windows")]
currentIndex: {
switch(plasmoid.configuration.leftClickAction) {
case Latte.Types.PresentWindows:
return 0;
case Latte.Types.CycleThroughTasks:
return 1;
case Latte.Types.PreviewWindows:
return 2;
}
currentIndex: {
switch(plasmoid.configuration.leftClickAction) {
case Latte.Types.PresentWindows:
return 0;
case Latte.Types.CycleThroughTasks:
return 1;
case Latte.Types.PreviewWindows:
return 2;
}
return 0;
onCurrentIndexChanged: {
switch(currentIndex) {
case 0:
plasmoid.configuration.leftClickAction = Latte.Types.PresentWindows;
break;
case 1:
plasmoid.configuration.leftClickAction = Latte.Types.CycleThroughTasks;
break;
case 2:
plasmoid.configuration.leftClickAction = Latte.Types.PreviewWindows;
break;
}
}
}
onCurrentIndexChanged: {
switch(currentIndex) {
case 0:
plasmoid.configuration.leftClickAction = Latte.Types.PresentWindows;
break;
case 1:
plasmoid.configuration.leftClickAction = Latte.Types.CycleThroughTasks;
break;
case 2:
plasmoid.configuration.leftClickAction = Latte.Types.PreviewWindows;
break;
}
PlasmaComponents.Label {
text: i18n("Middle Click")
}
}
PlasmaComponents.Label {
text: i18n("Middle Click")
}
LatteComponents.ComboBox {
id: middleClickAction
Layout.fillWidth: true
model: [
i18nc("The click action", "None"),
i18n("Close Window or Group"),
i18n("New Instance"),
i18n("Minimize/Restore Window or Group"),
i18n("Cycle Through Tasks"),
i18n("Toggle Task Grouping")
]
currentIndex: plasmoid.configuration.middleClickAction
onCurrentIndexChanged: plasmoid.configuration.middleClickAction = currentIndex
}
LatteComponents.ComboBox {
id: middleClickAction
Layout.fillWidth: true
model: [
i18nc("The click action", "None"),
i18n("Close Window or Group"),
i18n("New Instance"),
i18n("Minimize/Restore Window or Group"),
i18n("Cycle Through Tasks"),
i18n("Toggle Task Grouping")
]
currentIndex: plasmoid.configuration.middleClickAction
onCurrentIndexChanged: plasmoid.configuration.middleClickAction = currentIndex
}
PlasmaComponents.Label {
text: i18n("Hover")
}
PlasmaComponents.Label {
text: i18n("Hover")
}
LatteComponents.ComboBox {
id: hoverAction
Layout.fillWidth: true
model: [
i18nc("none action", "None"),
i18n("Preview Windows"),
i18n("Highlight Windows"),
i18n("Preview and Highlight Windows"),
]
currentIndex: {
switch(plasmoid.configuration.hoverAction) {
case Latte.Types.NoneAction:
return 0;
case Latte.Types.PreviewWindows:
return 1;
case Latte.Types.HighlightWindows:
return 2;
case Latte.Types.PreviewAndHighlightWindows:
return 3;
}
LatteComponents.ComboBox {
id: hoverAction
Layout.fillWidth: true
model: [
i18nc("none action", "None"),
i18n("Preview Windows"),
i18n("Highlight Windows"),
i18n("Preview and Highlight Windows"),
]
currentIndex: {
switch(plasmoid.configuration.hoverAction) {
case Latte.Types.NoneAction:
return 0;
case Latte.Types.PreviewWindows:
return 1;
case Latte.Types.HighlightWindows:
return 2;
case Latte.Types.PreviewAndHighlightWindows:
return 3;
}
return 0;
}
onCurrentIndexChanged: {
switch(currentIndex) {
case 0:
plasmoid.configuration.hoverAction = Latte.Types.NoneAction;
break;
case 1:
plasmoid.configuration.hoverAction = Latte.Types.PreviewWindows;
break;
case 2:
plasmoid.configuration.hoverAction = Latte.Types.HighlightWindows;
break;
case 3:
plasmoid.configuration.hoverAction = Latte.Types.PreviewAndHighlightWindows;
break;
onCurrentIndexChanged: {
switch(currentIndex) {
case 0:
plasmoid.configuration.hoverAction = Latte.Types.NoneAction;
break;
case 1:
plasmoid.configuration.hoverAction = Latte.Types.PreviewWindows;
break;
case 2:
plasmoid.configuration.hoverAction = Latte.Types.HighlightWindows;
break;
case 3:
plasmoid.configuration.hoverAction = Latte.Types.PreviewAndHighlightWindows;
break;
}
}
}
}
}
RowLayout {
Layout.leftMargin: units.smallSpacing * 2
Layout.topMargin: units.smallSpacing
spacing: units.smallSpacing
enabled: !disableAllWindowsFunctionality
RowLayout {
Layout.topMargin: units.smallSpacing
spacing: units.smallSpacing
enabled: !disableAllWindowsFunctionality
LatteComponents.ComboBox {
id: modifier
Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 5
model: ["Shift", "Ctrl", "Alt", "Meta"]
LatteComponents.ComboBox {
id: modifier
Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 5
model: ["Shift", "Ctrl", "Alt", "Meta"]
currentIndex: plasmoid.configuration.modifier
onCurrentIndexChanged: plasmoid.configuration.modifier = currentIndex
}
currentIndex: plasmoid.configuration.modifier
onCurrentIndexChanged: plasmoid.configuration.modifier = currentIndex
}
PlasmaComponents.Label {
text: "+"
}
PlasmaComponents.Label {
text: "+"
}
LatteComponents.ComboBox {
id: modifierClick
Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 10
model: [i18n("Left Click"), i18n("Middle Click"), i18n("Right Click")]
LatteComponents.ComboBox {
id: modifierClick
Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 10
model: [i18n("Left Click"), i18n("Middle Click"), i18n("Right Click")]
currentIndex: plasmoid.configuration.modifierClick
onCurrentIndexChanged: plasmoid.configuration.modifierClick = currentIndex
}
currentIndex: plasmoid.configuration.modifierClick
onCurrentIndexChanged: plasmoid.configuration.modifierClick = currentIndex
}
PlasmaComponents.Label {
text: "="
}
PlasmaComponents.Label {
text: "="
}
LatteComponents.ComboBox {
id: modifierClickAction
Layout.fillWidth: true
model: [i18nc("The click action", "None"), i18n("Close Window or Group"),
i18n("New Instance"), i18n("Minimize/Restore Window or Group"), i18n("Cycle Through Tasks"), i18n("Toggle Task Grouping")]
LatteComponents.ComboBox {
id: modifierClickAction
Layout.fillWidth: true
model: [i18nc("The click action", "None"), i18n("Close Window or Group"),
i18n("New Instance"), i18n("Minimize/Restore Window or Group"), i18n("Cycle Through Tasks"), i18n("Toggle Task Grouping")]
currentIndex: plasmoid.configuration.modifierClickAction
onCurrentIndexChanged: plasmoid.configuration.modifierClickAction = currentIndex
currentIndex: plasmoid.configuration.modifierClickAction
onCurrentIndexChanged: plasmoid.configuration.modifierClickAction = currentIndex
}
}
}
}
//! END: Actions
//! BEGIN: Actions
//! BEGIN: Recycling
ColumnLayout {
spacing: units.smallSpacing
Layout.rightMargin: units.smallSpacing * 2
visible: dialog.expertLevel
LatteComponents.Header {
@ -471,6 +487,7 @@ PlasmaComponents.Page {
PlasmaComponents.Button {
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing * 2
Layout.topMargin: units.smallSpacing
Layout.fillWidth: true

Loading…
Cancel
Save