From 1145b42e1712b095e5263d8ad6303c691e5ef83a Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Sun, 14 May 2017 02:24:05 +0300 Subject: [PATCH] fix margins for config window pages --the right margins should be equal to the left margins, this is the only way to create a symmetric look for congig window options --- .../contents/configuration/BehaviorConfig.qml | 7 +- .../contents/configuration/TasksConfig.qml | 4 ++ .../contents/configuration/TweaksConfig.qml | 69 +++++++++++-------- 3 files changed, 51 insertions(+), 29 deletions(-) diff --git a/shell/package/contents/configuration/BehaviorConfig.qml b/shell/package/contents/configuration/BehaviorConfig.qml index a94a844f4..1e07381af 100644 --- a/shell/package/contents/configuration/BehaviorConfig.qml +++ b/shell/package/contents/configuration/BehaviorConfig.qml @@ -46,6 +46,7 @@ PlasmaComponents.Page { ColumnLayout { Layout.fillWidth: true spacing: units.smallSpacing + Layout.rightMargin: units.smallSpacing * 2 Header { text: i18n("Location") @@ -241,6 +242,7 @@ PlasmaComponents.Page { ColumnLayout { Layout.fillWidth: true spacing: units.smallSpacing + Layout.rightMargin: units.smallSpacing * 2 Header { text: i18n("Alignment") @@ -325,6 +327,7 @@ PlasmaComponents.Page { ColumnLayout { Layout.fillWidth: true spacing: units.smallSpacing + Layout.rightMargin: units.smallSpacing * 2 Header { text: i18n("Visibility") @@ -410,6 +413,7 @@ PlasmaComponents.Page { //! BEGIN: Delay ColumnLayout { Layout.fillWidth: true + Layout.rightMargin: units.smallSpacing * 2 spacing: units.smallSpacing enabled: !(dock.visibility.mode === Latte.Dock.AlwaysVisible @@ -421,13 +425,12 @@ PlasmaComponents.Page { } RowLayout { - Layout.fillWidth: false Layout.leftMargin: units.smallSpacing * 2 Layout.rightMargin: units.smallSpacing * 2 Layout.alignment: Qt.AlignHCenter - spacing: units.smallSpacing + spacing: 2 PlasmaComponents.Label { Layout.fillWidth: false diff --git a/shell/package/contents/configuration/TasksConfig.qml b/shell/package/contents/configuration/TasksConfig.qml index 8b1a9bb48..7058487be 100644 --- a/shell/package/contents/configuration/TasksConfig.qml +++ b/shell/package/contents/configuration/TasksConfig.qml @@ -39,10 +39,12 @@ PlasmaComponents.Page { spacing: dialog.subGroupSpacing anchors.centerIn: parent Layout.leftMargin: units.smallSpacing * 2 + Layout.rightMargin: units.smallSpacing * 2 //! BEGIN: Tasks Appearance ColumnLayout { spacing: units.smallSpacing + Layout.rightMargin: units.smallSpacing * 2 Header { text: i18n("Appearance") @@ -99,6 +101,7 @@ PlasmaComponents.Page { //! BEGIN: Tasks Interaction ColumnLayout { spacing: units.smallSpacing + Layout.rightMargin: units.smallSpacing * 2 Header { text: i18n("Interaction") @@ -231,6 +234,7 @@ PlasmaComponents.Page { //! BEGIN: Tasks Filters ColumnLayout { spacing: units.smallSpacing + Layout.rightMargin: units.smallSpacing * 2 Header { text: i18n("Filters") diff --git a/shell/package/contents/configuration/TweaksConfig.qml b/shell/package/contents/configuration/TweaksConfig.qml index e2734ad1d..0d0d6d5bb 100644 --- a/shell/package/contents/configuration/TweaksConfig.qml +++ b/shell/package/contents/configuration/TweaksConfig.qml @@ -39,10 +39,12 @@ PlasmaComponents.Page { spacing: dialog.subGroupSpacing anchors.centerIn: parent Layout.leftMargin: units.smallSpacing * 2 + Layout.rightMargin: units.smallSpacing * 2 //! BEGIN: Appearance ColumnLayout { spacing: units.smallSpacing + Layout.rightMargin: units.smallSpacing * 2 Header { text: i18n("Appearance") @@ -75,6 +77,7 @@ PlasmaComponents.Page { //! BEGIN: Behavior ColumnLayout { spacing: units.smallSpacing + Layout.rightMargin: units.smallSpacing * 2 Header { text: i18n("Behavior") @@ -94,7 +97,7 @@ PlasmaComponents.Page { Layout.leftMargin: units.smallSpacing * 2 text: i18n("Decrease applets size when it is needed") checked: plasmoid.configuration.autoDecreaseIconSize -// tooltip: i18n("Applets size is decreased automatically when the contents \nexceed the maximum length") + // tooltip: i18n("Applets size is decreased automatically when the contents \nexceed the maximum length") onClicked: { plasmoid.configuration.autoDecreaseIconSize = checked @@ -105,7 +108,7 @@ PlasmaComponents.Page { Layout.leftMargin: units.smallSpacing * 2 text: i18n("Add launchers only in the corresponding area") checked: plasmoid.configuration.addLaunchersInTaskManager -// tooltip: i18n("Launchers are added only in the taskmanager and not as plasma applets") + // tooltip: i18n("Launchers are added only in the taskmanager and not as plasma applets") onClicked: { plasmoid.configuration.addLaunchersInTaskManager = checked; @@ -119,7 +122,7 @@ PlasmaComponents.Page { enabled: !(dock.visibility.mode === Latte.Dock.AlwaysVisible || dock.visibility.mode === Latte.Dock.WindowsGoBelow) -// tooltip: i18n("Remove the BypassWindowManagerHint flag from the window") + // tooltip: i18n("Remove the BypassWindowManagerHint flag from the window") onCheckedChanged: { dock.dockWinBehavior = checked @@ -163,36 +166,43 @@ PlasmaComponents.Page { //! BEGIN: Session ColumnLayout { spacing: units.smallSpacing + Layout.rightMargin: units.smallSpacing * 2 Header { text: i18n("Session") } - PlasmaComponents.Button { - Layout.leftMargin: units.smallSpacing * 2 - Layout.rightMargin: units.smallSpacing * 2 + RowLayout { Layout.fillWidth: true - text: i18n("Alternative Session") - checked: globalSettings.currentSession === Latte.Dock.AlternativeSession - checkable: true -// tooltip: i18n("Sometimes the current layout of your panels is not sufficient \nfor example when you are travelling. Latte provides you with a full \nalternative sessionn to work on.") + Layout.leftMargin: units.smallSpacing * 2 + spacing: units.smallSpacing - onClicked: { - if (globalSettings.currentSession === Latte.Dock.DefaultSession) { - globalSettings.currentSession = Latte.Dock.AlternativeSession - } else { - globalSettings.currentSession = Latte.Dock.DefaultSession + PlasmaComponents.Button { + Layout.fillWidth: true + text: i18n("Alternative Session") + checked: globalSettings.currentSession === Latte.Dock.AlternativeSession + checkable: true + // tooltip: i18n("Sometimes the current layout of your panels is not sufficient \nfor example when you are travelling. Latte provides you with a full \nalternative sessionn to work on.") + + onClicked: { + if (globalSettings.currentSession === Latte.Dock.DefaultSession) { + globalSettings.currentSession = Latte.Dock.AlternativeSession + } else { + globalSettings.currentSession = Latte.Dock.DefaultSession + } + dockConfig.hideConfigWindow() } - dockConfig.hideConfigWindow() } + } } //! END: Session //! BEGIN: Extra Actions ColumnLayout { - Layout.fillWidth: false + Layout.fillWidth: true spacing: units.smallSpacing + Layout.rightMargin: units.smallSpacing * 2 Header { text: i18n("Extra Actions") @@ -201,28 +211,27 @@ PlasmaComponents.Page { RowLayout { Layout.fillWidth: true Layout.leftMargin: units.smallSpacing * 2 - Layout.rightMargin: units.smallSpacing * 2 - spacing: units.smallSpacing + spacing: 2 PlasmaComponents.Button { iconSource: "distribute-horizontal-x" text: i18n("Add Spacer") + Layout.fillWidth: true Layout.alignment: Qt.AlignLeft -// tooltip: i18n("Add a spacer to separate applets") + // tooltip: i18n("Add a spacer to separate applets") onClicked: { dockConfig.addPanelSpacer() } } + PlasmaComponents.Button { iconSource: plasmoid.configuration.hasInternalSeparator ? "edit-delete" : "list-add" text: i18n("Tasks Separator") + Layout.fillWidth: true Layout.alignment: Qt.AlignLeft - //The Tasks separator adds a lot of complexity in the parabolic effect - //signaling... For now I disable it and in the future if a better way - //is found to support it with the parabolic effect we can enable it again visible: dock.tasksPresent() -// tooltip: i18n("Add a separator for tasks") + // tooltip: i18n("Add a separator for tasks") onClicked: { if (plasmoid.configuration.hasInternalSeparator) @@ -231,18 +240,24 @@ PlasmaComponents.Page { dockConfig.addTasksSeparator(); } } + } + + RowLayout { + Layout.fillWidth: true + Layout.leftMargin: units.smallSpacing * 2 + Layout.rightMargin: units.smallSpacing * 2 + spacing: units.smallSpacing + PlasmaComponents.Button { iconSource: "edit-delete" text: i18n("Remove Tasks") - Layout.alignment: Qt.AlignRight enabled: dock.tasksPresent() -// tooltip: i18n("Remove Latte plasmoid") + // tooltip: i18n("Remove Latte plasmoid") onClicked: { dock.removeTasksPlasmoid(); } } - } } //! END: Extra Actions