From 10ee2d9ab86266edb07168cb5c74b69cd34a4b70 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Wed, 27 Mar 2019 01:50:55 +0200 Subject: [PATCH] fixes for reversed state of config window --- .../package/contents/ui/applet/AppletItem.qml | 2 +- .../components/HeaderSwitch.qml | 17 + .../configuration/pages/AppearanceConfig.qml | 972 +++++++++--------- .../configuration/pages/BehaviorConfig.qml | 63 +- .../configuration/pages/EffectsConfig.qml | 219 ++-- .../configuration/pages/TasksConfig.qml | 567 +++++----- 6 files changed, 935 insertions(+), 905 deletions(-) diff --git a/containment/package/contents/ui/applet/AppletItem.qml b/containment/package/contents/ui/applet/AppletItem.qml index d51700521..d0631032a 100644 --- a/containment/package/contents/ui/applet/AppletItem.qml +++ b/containment/package/contents/ui/applet/AppletItem.qml @@ -566,7 +566,7 @@ Item { property bool rectangled: canBeHovered && !lockZoom ShortcutBadge{ - // anchors.fill: wrapper + anchors.fill: parent } } } diff --git a/declarativeimports/components/HeaderSwitch.qml b/declarativeimports/components/HeaderSwitch.qml index b72169cbd..8253ee383 100644 --- a/declarativeimports/components/HeaderSwitch.qml +++ b/declarativeimports/components/HeaderSwitch.qml @@ -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 { diff --git a/shell/package/contents/configuration/pages/AppearanceConfig.qml b/shell/package/contents/configuration/pages/AppearanceConfig.qml index 39355f062..871ef02ab 100644 --- a/shell/package/contents/configuration/pages/AppearanceConfig.qml +++ b/shell/package/contents/configuration/pages/AppearanceConfig.qml @@ -57,7 +57,6 @@ PlasmaComponents.Page { ColumnLayout { Layout.fillWidth: true Layout.topMargin: units.smallSpacing - Layout.rightMargin: units.smallSpacing * 2 spacing: units.smallSpacing visible: false //dialog.highLevel @@ -68,6 +67,7 @@ PlasmaComponents.Page { RowLayout { Layout.fillWidth: true Layout.leftMargin: units.smallSpacing * 2 + Layout.rightMargin: units.smallSpacing * 2 spacing: units.smallSpacing LatteComponents.ComboBox { @@ -140,343 +140,331 @@ PlasmaComponents.Page { Layout.fillWidth: true //Layout.topMargin: dialog.highLevel ? 0 : units.smallSpacing Layout.topMargin: units.smallSpacing - Layout.rightMargin: units.smallSpacing * 2 + spacing: units.smallSpacing LatteComponents.Header { text: i18n("Items") } - LatteComponents.SubHeader { - text: i18nc("items effects", "Size") - isFirstSubCategory: true - } - - RowLayout { - Layout.fillWidth: true + ColumnLayout { Layout.leftMargin: units.smallSpacing * 2 - spacing: units.smallSpacing - enabled: proportionSizeSlider.value === 1 + Layout.rightMargin: units.smallSpacing * 2 + spacing: 0 - PlasmaComponents.Label { - text: i18nc("absolute size","Absolute") - horizontalAlignment: Text.AlignLeft + LatteComponents.SubHeader { + text: i18nc("items effects", "Size") + isFirstSubCategory: true } - LatteComponents.Slider { - id: appletsSizeSlider + RowLayout { Layout.fillWidth: true - value: plasmoid.configuration.iconSize - from: 16 - to: 128 - stepSize: dialog.highLevel || (plasmoid.configuration.iconSize % 8 !== 0) || dialog.viewIsPanel ? 1 : 8 - wheelEnabled: false + spacing: units.smallSpacing + enabled: proportionSizeSlider.value === 1 + + PlasmaComponents.Label { + text: i18nc("absolute size","Absolute") + horizontalAlignment: Text.AlignLeft + } + + LatteComponents.Slider { + id: appletsSizeSlider + Layout.fillWidth: true + value: plasmoid.configuration.iconSize + from: 16 + to: 128 + stepSize: dialog.highLevel || (plasmoid.configuration.iconSize % 8 !== 0) || dialog.viewIsPanel ? 1 : 8 + wheelEnabled: false + + function updateIconSize() { + if (!pressed) { + plasmoid.configuration.iconSize = value + syncGeometry.restart() + } + } - function updateIconSize() { - if (!pressed) { - plasmoid.configuration.iconSize = value - syncGeometry.restart() + onPressedChanged: { + updateIconSize() } - } - onPressedChanged: { - updateIconSize() - } + Component.onCompleted: { + valueChanged.connect(updateIconSize); - Component.onCompleted: { - valueChanged.connect(updateIconSize); + if (plasmoid.configuration.iconSize>128) { + to = plasmoid.configuration.iconSize + 64 + } else { + to = 128 + } + } - if (plasmoid.configuration.iconSize>128) { - to = plasmoid.configuration.iconSize + 64 - } else { - to = 128 + Component.onDestruction: { + valueChanged.disconnect(updateIconSize); } } - Component.onDestruction: { - valueChanged.disconnect(updateIconSize); + PlasmaComponents.Label { + text: appletsSizeSlider.value + " px." + horizontalAlignment: Text.AlignRight + Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4 + Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4 } } - PlasmaComponents.Label { - text: appletsSizeSlider.value + " px." - horizontalAlignment: Text.AlignRight - Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4 - Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4 - } - } - - RowLayout { - Layout.fillWidth: true - Layout.leftMargin: units.smallSpacing * 2 - spacing: units.smallSpacing - visible: dialog.expertLevel || plasmoid.configuration.proportionIconSize>0 - - PlasmaComponents.Label { - text: i18nc("relative size", "Relative") - horizontalAlignment: Text.AlignLeft - enabled: proportionSizeSlider.value !== proportionSizeSlider.from - } - - LatteComponents.Slider { - id: proportionSizeSlider + RowLayout { Layout.fillWidth: true - value: plasmoid.configuration.proportionIconSize - from: 1.0 - to: 10 - stepSize: 0.5 - wheelEnabled: false - - function updateProportionIconSize() { - if (!pressed) { - if(value===1) { - plasmoid.configuration.proportionIconSize = -1; - } else { - plasmoid.configuration.proportionIconSize = value; + spacing: units.smallSpacing + visible: dialog.expertLevel || plasmoid.configuration.proportionIconSize>0 + + PlasmaComponents.Label { + text: i18nc("relative size", "Relative") + horizontalAlignment: Text.AlignLeft + enabled: proportionSizeSlider.value !== proportionSizeSlider.from + } + + LatteComponents.Slider { + id: proportionSizeSlider + Layout.fillWidth: true + value: plasmoid.configuration.proportionIconSize + from: 1.0 + to: 10 + stepSize: 0.5 + wheelEnabled: false + + function updateProportionIconSize() { + if (!pressed) { + if(value===1) { + plasmoid.configuration.proportionIconSize = -1; + } else { + plasmoid.configuration.proportionIconSize = value; + } } } - } - onPressedChanged: { - updateProportionIconSize(); - } + onPressedChanged: { + updateProportionIconSize(); + } - Component.onCompleted: { - valueChanged.connect(updateProportionIconSize) + Component.onCompleted: { + valueChanged.connect(updateProportionIconSize) + } + + Component.onDestruction: { + valueChanged.disconnect(updateProportionIconSize) + } } - Component.onDestruction: { - valueChanged.disconnect(updateProportionIconSize) + PlasmaComponents.Label { + text: proportionSizeSlider.value !== proportionSizeSlider.from ? + proportionSizeSlider.value.toFixed(1) + " %" : "--- %" + horizontalAlignment: Text.AlignRight + Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4 + Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4 + enabled: proportionSizeSlider.value !== proportionSizeSlider.from } } - PlasmaComponents.Label { - text: proportionSizeSlider.value !== proportionSizeSlider.from ? - proportionSizeSlider.value.toFixed(1) + " %" : "--- %" - horizontalAlignment: Text.AlignRight - Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4 - Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4 - enabled: proportionSizeSlider.value !== proportionSizeSlider.from + LatteComponents.SubHeader { + text: i18nc("items effects", "Effects") + //isFirstSubCategory: true } - } - LatteComponents.SubHeader { - text: i18nc("items effects", "Effects") - //isFirstSubCategory: true - } + RowLayout { + Layout.fillWidth: true + spacing: units.smallSpacing + enabled: plasmoid.configuration.durationTime > 0 - RowLayout { - Layout.fillWidth: true - Layout.leftMargin: units.smallSpacing * 2 - spacing: units.smallSpacing - enabled: plasmoid.configuration.durationTime > 0 + PlasmaComponents.Label { + text: i18n("Zoom On Hover") + horizontalAlignment: Text.AlignLeft + } - PlasmaComponents.Label { - text: i18n("Zoom On Hover") - horizontalAlignment: Text.AlignLeft - } + LatteComponents.Slider { + Layout.fillWidth: true + id: zoomSlider - LatteComponents.Slider { - Layout.fillWidth: true - id: zoomSlider + value: Number(1 + plasmoid.configuration.zoomLevel / 20).toFixed(2) + from: 1 + to: 2 + stepSize: 0.05 + wheelEnabled: false - value: Number(1 + plasmoid.configuration.zoomLevel / 20).toFixed(2) - from: 1 - to: 2 - stepSize: 0.05 - wheelEnabled: false + function updateZoomLevel() { + if (!pressed) { + var result = Math.round((value - 1) * 20) + plasmoid.configuration.zoomLevel = result + } + } - function updateZoomLevel() { - if (!pressed) { - var result = Math.round((value - 1) * 20) - plasmoid.configuration.zoomLevel = result + onPressedChanged: { + updateZoomLevel() } - } - onPressedChanged: { - updateZoomLevel() - } + Component.onCompleted: { + valueChanged.connect(updateZoomLevel) + } - Component.onCompleted: { - valueChanged.connect(updateZoomLevel) + Component.onDestruction: { + valueChanged.disconnect(updateZoomLevel) + } } - Component.onDestruction: { - valueChanged.disconnect(updateZoomLevel) + PlasmaComponents.Label { + text: Number((zoomSlider.value * 100) - 100).toFixed(0) + " %" + horizontalAlignment: Text.AlignRight + Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4 + Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4 } } - - PlasmaComponents.Label { - text: Number((zoomSlider.value * 100) - 100).toFixed(0) + " %" - horizontalAlignment: Text.AlignRight - Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4 - Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4 - } - } - - /* - LatteExtraControls.SubHeader { - visible: dialog.expertLevel - text: i18nc("automatic options", "Automatic") - isFirstSubCategory: true } - - PlasmaComponents.CheckBox { - Layout.leftMargin: units.smallSpacing * 2 - text: i18n("Decrease size automatically when needed") - checked: plasmoid.configuration.autoDecreaseIconSize - tooltip: i18n("Items size is decreased automatically when the contents exceed the maximum length \n\nHint: this option is disabled when plasma taskmanagers are present") - enabled: !(latteView.tasksPresent() && !latteView.latteTasksPresent()); - visible: dialog.expertLevel - - onClicked: { - plasmoid.configuration.autoDecreaseIconSize = checked - } - }*/ } //! END: Items //! BEGIN: Length ColumnLayout { Layout.fillWidth: true - Layout.rightMargin: units.smallSpacing * 2 + spacing: units.smallSpacing LatteComponents.Header { text: i18n("Length") } - RowLayout { - Layout.fillWidth: true + ColumnLayout { Layout.leftMargin: units.smallSpacing * 2 - spacing: units.smallSpacing - - PlasmaComponents.Label { - text: i18n("Maximum") - horizontalAlignment: Text.AlignLeft - } + Layout.rightMargin: units.smallSpacing * 2 + spacing: 0 - LatteComponents.Slider { + RowLayout { Layout.fillWidth: true - id: maxLengthSlider - - value: plasmoid.configuration.maxLength - from: 30 - to: 100 - stepSize: 2 - wheelEnabled: false - - function updateMaxLength() { - if (!pressed) { - plasmoid.configuration.maxLength = value; - var newTotal = Math.abs(plasmoid.configuration.offset) + value; - - //centered and justify alignments based on offset and get out of the screen in some cases - var centeredCheck = ((plasmoid.configuration.panelPosition === Latte.Types.Center) - || (plasmoid.configuration.panelPosition === Latte.Types.Justify)) - && ((Math.abs(plasmoid.configuration.offset) + value/2) > 50); - - if (newTotal > 100 || centeredCheck) { - if ((plasmoid.configuration.panelPosition === Latte.Types.Center) - || (plasmoid.configuration.panelPosition === Latte.Types.Justify)) { - - var suggestedValue = (plasmoid.configuration.offset<0) ? Math.min(0, -(100-value)): Math.max(0, 100-value); - - if ((Math.abs(suggestedValue) + value/2) > 50) { - if (suggestedValue < 0) { - suggestedValue = - (50 - value/2); - } else { - suggestedValue = 50 - value/2; + + spacing: units.smallSpacing + + PlasmaComponents.Label { + text: i18n("Maximum") + horizontalAlignment: Text.AlignLeft + } + + LatteComponents.Slider { + Layout.fillWidth: true + id: maxLengthSlider + + value: plasmoid.configuration.maxLength + from: 30 + to: 100 + stepSize: 2 + wheelEnabled: false + + function updateMaxLength() { + if (!pressed) { + plasmoid.configuration.maxLength = value; + var newTotal = Math.abs(plasmoid.configuration.offset) + value; + + //centered and justify alignments based on offset and get out of the screen in some cases + var centeredCheck = ((plasmoid.configuration.panelPosition === Latte.Types.Center) + || (plasmoid.configuration.panelPosition === Latte.Types.Justify)) + && ((Math.abs(plasmoid.configuration.offset) + value/2) > 50); + + if (newTotal > 100 || centeredCheck) { + if ((plasmoid.configuration.panelPosition === Latte.Types.Center) + || (plasmoid.configuration.panelPosition === Latte.Types.Justify)) { + + var suggestedValue = (plasmoid.configuration.offset<0) ? Math.min(0, -(100-value)): Math.max(0, 100-value); + + if ((Math.abs(suggestedValue) + value/2) > 50) { + if (suggestedValue < 0) { + suggestedValue = - (50 - value/2); + } else { + suggestedValue = 50 - value/2; + } } - } - plasmoid.configuration.offset = suggestedValue; - } else { - plasmoid.configuration.offset = Math.max(0, 100-value); + plasmoid.configuration.offset = suggestedValue; + } else { + plasmoid.configuration.offset = Math.max(0, 100-value); + } } } } - } - onPressedChanged: { - updateMaxLength(); - } + onPressedChanged: { + updateMaxLength(); + } - Component.onCompleted: { - valueChanged.connect(updateMaxLength) - } + Component.onCompleted: { + valueChanged.connect(updateMaxLength) + } - Component.onDestruction: { - valueChanged.disconnect(updateMaxLength) + Component.onDestruction: { + valueChanged.disconnect(updateMaxLength) + } } - } - - PlasmaComponents.Label { - text: maxLengthSlider.value + " %" - horizontalAlignment: Text.AlignRight - Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4 - Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4 - } - } - - RowLayout { - Layout.fillWidth: true - Layout.leftMargin: units.smallSpacing * 2 - spacing: units.smallSpacing - visible: dialog.expertLevel - PlasmaComponents.Label { - text: i18n("Offset") - horizontalAlignment: Text.AlignLeft + PlasmaComponents.Label { + text: maxLengthSlider.value + " %" + horizontalAlignment: Text.AlignRight + Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4 + Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4 + } } - LatteComponents.Slider { + RowLayout { Layout.fillWidth: true - id: offsetSlider - - value: plasmoid.configuration.offset - from: ((plasmoid.configuration.panelPosition === Latte.Types.Center) - || (plasmoid.configuration.panelPosition === Latte.Types.Justify)) ? -20 : 0 - to: ((plasmoid.configuration.panelPosition === Latte.Types.Center) - || (plasmoid.configuration.panelPosition === Latte.Types.Justify)) ? 20 : 40 - stepSize: 2 - wheelEnabled: false - - function updateOffset() { - if (!pressed) { - plasmoid.configuration.offset = value; - var newTotal = Math.abs(value) + plasmoid.configuration.maxLength; - - //centered and justify alignments based on offset and get out of the screen in some cases - var centeredCheck = ((plasmoid.configuration.panelPosition === Latte.Types.Center) - || (plasmoid.configuration.panelPosition === Latte.Types.Justify)) - && ((Math.abs(value) + plasmoid.configuration.maxLength/2) > 50); - if (newTotal > 100 || centeredCheck) { - plasmoid.configuration.maxLength = ((plasmoid.configuration.panelPosition === Latte.Types.Center) - || (plasmoid.configuration.panelPosition === Latte.Types.Justify)) ? - 2*(50 - Math.abs(value)) :100 - Math.abs(value); + spacing: units.smallSpacing + visible: dialog.expertLevel + + PlasmaComponents.Label { + text: i18n("Offset") + horizontalAlignment: Text.AlignLeft + } + + LatteComponents.Slider { + Layout.fillWidth: true + id: offsetSlider + + value: plasmoid.configuration.offset + from: ((plasmoid.configuration.panelPosition === Latte.Types.Center) + || (plasmoid.configuration.panelPosition === Latte.Types.Justify)) ? -20 : 0 + to: ((plasmoid.configuration.panelPosition === Latte.Types.Center) + || (plasmoid.configuration.panelPosition === Latte.Types.Justify)) ? 20 : 40 + stepSize: 2 + wheelEnabled: false + + function updateOffset() { + if (!pressed) { + plasmoid.configuration.offset = value; + var newTotal = Math.abs(value) + plasmoid.configuration.maxLength; + + //centered and justify alignments based on offset and get out of the screen in some cases + var centeredCheck = ((plasmoid.configuration.panelPosition === Latte.Types.Center) + || (plasmoid.configuration.panelPosition === Latte.Types.Justify)) + && ((Math.abs(value) + plasmoid.configuration.maxLength/2) > 50); + if (newTotal > 100 || centeredCheck) { + plasmoid.configuration.maxLength = ((plasmoid.configuration.panelPosition === Latte.Types.Center) + || (plasmoid.configuration.panelPosition === Latte.Types.Justify)) ? + 2*(50 - Math.abs(value)) :100 - Math.abs(value); + } } } - } - onPressedChanged: { - updateOffset(); - } + onPressedChanged: { + updateOffset(); + } - Component.onCompleted: { - valueChanged.connect(updateOffset); - } + Component.onCompleted: { + valueChanged.connect(updateOffset); + } - Component.onDestruction: { - valueChanged.disconnect(updateOffset); + Component.onDestruction: { + valueChanged.disconnect(updateOffset); + } } - } - PlasmaComponents.Label { - text: offsetSlider.value + " %" - horizontalAlignment: Text.AlignRight - Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4 - Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4 + PlasmaComponents.Label { + text: offsetSlider.value + " %" + horizontalAlignment: Text.AlignRight + Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4 + Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4 + } } } } @@ -486,7 +474,7 @@ PlasmaComponents.Page { ColumnLayout { id: marginsColumn Layout.fillWidth: true - Layout.rightMargin: units.smallSpacing * 2 + spacing: units.smallSpacing visible: dialog.expertLevel @@ -496,89 +484,96 @@ PlasmaComponents.Page { text: i18n("Margins") } - RowLayout { - Layout.fillWidth: true + ColumnLayout{ Layout.leftMargin: units.smallSpacing * 2 - spacing: units.smallSpacing + Layout.rightMargin: units.smallSpacing * 2 + spacing: 0 - PlasmaComponents.Label { - text: i18n("Length") - horizontalAlignment: Text.AlignLeft - } - - LatteComponents.Slider { - id: lengthExtMarginSlider + RowLayout { Layout.fillWidth: true - value: plasmoid.configuration.lengthExtMargin - from: 0 - to: marginsColumn.maxMargin - stepSize: 1 - wheelEnabled: false + spacing: units.smallSpacing - onPressedChanged: { - if (!pressed) { - plasmoid.configuration.lengthExtMargin = value; - } + PlasmaComponents.Label { + text: i18n("Length") + horizontalAlignment: Text.AlignLeft } - } - PlasmaComponents.Label { - text: lengthExtMarginSlider.value + " %" - horizontalAlignment: Text.AlignRight - Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4 - Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4 - } - } + LatteComponents.Slider { + id: lengthExtMarginSlider + Layout.fillWidth: true - LatteComponents.HeaderSwitch { - id: shrinkThickMargins - Layout.fillWidth: true - Layout.minimumHeight: implicitHeight + value: plasmoid.configuration.lengthExtMargin + from: 0 + to: marginsColumn.maxMargin + stepSize: 1 + wheelEnabled: false - checked: !plasmoid.configuration.shrinkThickMargins - level: 2 - text: i18n("Thickness") - tooltip: i18n("Enable/disable thickness margins") + onPressedChanged: { + if (!pressed) { + plasmoid.configuration.lengthExtMargin = value; + } + } + } - onPressed: { - plasmoid.configuration.shrinkThickMargins = !plasmoid.configuration.shrinkThickMargins; + PlasmaComponents.Label { + text: lengthExtMarginSlider.value + " %" + horizontalAlignment: Text.AlignRight + Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4 + Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4 + } } - } - RowLayout { - Layout.fillWidth: true - Layout.leftMargin: units.smallSpacing * 2 - spacing: units.smallSpacing - enabled: !plasmoid.configuration.shrinkThickMargins + LatteComponents.HeaderSwitch { + id: shrinkThickMargins + Layout.fillWidth: true + Layout.minimumHeight: implicitHeight + Layout.bottomMargin: units.smallSpacing - PlasmaComponents.Label { - text: plasmoid.formFactor === PlasmaCore.Types.Horizontal ? i18n("Height") : i18n("Width") - horizontalAlignment: Text.AlignLeft + checked: !plasmoid.configuration.shrinkThickMargins + level: 2 + text: i18n("Thickness") + tooltip: i18n("Enable/disable thickness margins") + isFirstSubCategory: true + + onPressed: { + plasmoid.configuration.shrinkThickMargins = !plasmoid.configuration.shrinkThickMargins; + } } - LatteComponents.Slider { - id: thickMarginSlider + RowLayout { Layout.fillWidth: true + spacing: units.smallSpacing + enabled: !plasmoid.configuration.shrinkThickMargins + + PlasmaComponents.Label { + text: plasmoid.formFactor === PlasmaCore.Types.Horizontal ? i18n("Height") : i18n("Width") + horizontalAlignment: Text.AlignLeft + } + + LatteComponents.Slider { + id: thickMarginSlider + Layout.fillWidth: true - value: plasmoid.configuration.thickMargin - from: 0 - to: 40 - stepSize: 1 - wheelEnabled: false + value: plasmoid.configuration.thickMargin + from: 0 + to: 40 + stepSize: 1 + wheelEnabled: false - onPressedChanged: { - if (!pressed) { - plasmoid.configuration.thickMargin = value; + onPressedChanged: { + if (!pressed) { + plasmoid.configuration.thickMargin = value; + } } } - } - PlasmaComponents.Label { - text: thickMarginSlider.value + " %" - horizontalAlignment: Text.AlignRight - Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4 - Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4 + PlasmaComponents.Label { + text: thickMarginSlider.value + " %" + horizontalAlignment: Text.AlignRight + Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4 + Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4 + } } } } @@ -587,7 +582,6 @@ PlasmaComponents.Page { //! BEGIN: Colors ColumnLayout { spacing: units.smallSpacing - Layout.rightMargin: units.smallSpacing * 2 visible: dialog.expertLevel LatteComponents.Header { @@ -598,6 +592,7 @@ PlasmaComponents.Page { GridLayout { Layout.fillWidth: true Layout.leftMargin: units.smallSpacing * 2 + Layout.rightMargin: units.smallSpacing * 2 columnSpacing: 2 rowSpacing: units.smallSpacing columns: 3 @@ -706,7 +701,6 @@ PlasmaComponents.Page { //! BEGIN: Background ColumnLayout { Layout.fillWidth: true - Layout.rightMargin: units.smallSpacing * 2 spacing: units.smallSpacing enabled: Latte.WindowSystem.compositingActive @@ -725,227 +719,227 @@ PlasmaComponents.Page { } } - RowLayout { - Layout.fillWidth: true + ColumnLayout { Layout.leftMargin: units.smallSpacing * 2 + Layout.rightMargin: units.smallSpacing * 2 + spacing: 0 - PlasmaComponents.Label { - enabled: showBackground.checked - text: i18n("Size") - horizontalAlignment: Text.AlignLeft - } - - LatteComponents.Slider { - id: panelSizeSlider + RowLayout { Layout.fillWidth: true - enabled: showBackground.checked - value: plasmoid.configuration.panelSize - from: 0 - to: 100 - stepSize: 1 - wheelEnabled: false - function updatePanelSize() { - if (!pressed) - plasmoid.configuration.panelSize = value + PlasmaComponents.Label { + enabled: showBackground.checked + text: i18n("Size") + horizontalAlignment: Text.AlignLeft } - onPressedChanged: { - updatePanelSize(); - } + LatteComponents.Slider { + id: panelSizeSlider + Layout.fillWidth: true + enabled: showBackground.checked - Component.onCompleted: { - valueChanged.connect(updatePanelSize) - } + value: plasmoid.configuration.panelSize + from: 0 + to: 100 + stepSize: 1 + wheelEnabled: false - Component.onDestruction: { - valueChanged.disconnect(updatePanelSize) - } - } + function updatePanelSize() { + if (!pressed) + plasmoid.configuration.panelSize = value + } - PlasmaComponents.Label { - enabled: showBackground.checked - text: panelSizeSlider.value + " %" - horizontalAlignment: Text.AlignRight - Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4 - Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4 - } - } + onPressedChanged: { + updatePanelSize(); + } - RowLayout { - Layout.fillWidth: true - Layout.leftMargin: units.smallSpacing * 2 + Component.onCompleted: { + valueChanged.connect(updatePanelSize) + } - PlasmaComponents.Label { - text: i18n("Opacity") - horizontalAlignment: Text.AlignLeft - enabled: transparencySlider.enabled + Component.onDestruction: { + valueChanged.disconnect(updatePanelSize) + } + } + + PlasmaComponents.Label { + enabled: showBackground.checked + text: panelSizeSlider.value + " %" + horizontalAlignment: Text.AlignRight + Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4 + Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4 + } } - LatteComponents.Slider { - id: transparencySlider + RowLayout { Layout.fillWidth: true - enabled: showBackground.checked //&& !blockOpacityAdjustment - value: plasmoid.configuration.panelTransparency - from: 0 - to: 100 - stepSize: 1 - wheelEnabled: false + PlasmaComponents.Label { + text: i18n("Opacity") + horizontalAlignment: Text.AlignLeft + enabled: transparencySlider.enabled + } + + LatteComponents.Slider { + id: transparencySlider + Layout.fillWidth: true + enabled: showBackground.checked //&& !blockOpacityAdjustment + + value: plasmoid.configuration.panelTransparency + from: 0 + to: 100 + stepSize: 1 + wheelEnabled: false - /*property bool blockOpacityAdjustment: (plasmoid.configuration.solidBackgroundForMaximized && plasmoid.configuration.backgroundOnlyOnMaximized) + /*property bool blockOpacityAdjustment: (plasmoid.configuration.solidBackgroundForMaximized && plasmoid.configuration.backgroundOnlyOnMaximized) || (solidBackground.checked && !plasmoid.configuration.solidBackgroundForMaximized && !plasmoid.configuration.backgroundOnlyOnMaximized)*/ - function updatePanelTransparency() { - if (!pressed) - plasmoid.configuration.panelTransparency = value - } + function updatePanelTransparency() { + if (!pressed) + plasmoid.configuration.panelTransparency = value + } - onPressedChanged: { - updatePanelTransparency(); - } + onPressedChanged: { + updatePanelTransparency(); + } + + Component.onCompleted: { + valueChanged.connect(updatePanelTransparency); + } - Component.onCompleted: { - valueChanged.connect(updatePanelTransparency); + Component.onDestruction: { + valueChanged.disconnect(updatePanelTransparency); + } } - Component.onDestruction: { - valueChanged.disconnect(updatePanelTransparency); + PlasmaComponents.Label { + enabled: transparencySlider.enabled + text: transparencySlider.value + " %" + horizontalAlignment: Text.AlignRight + Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4 + Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4 } } - PlasmaComponents.Label { - enabled: transparencySlider.enabled - text: transparencySlider.value + " %" - horizontalAlignment: Text.AlignRight - Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4 - Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4 + LatteComponents.SubHeader { + visible: dialog.expertLevel + isFirstSubCategory: true + text: i18n("Options") } - } - LatteComponents.SubHeader { - visible: dialog.expertLevel - isFirstSubCategory: true - text: i18n("Options") - } + RowLayout { + Layout.fillWidth: true + spacing: 2 + visible: dialog.expertLevel + + PlasmaComponents.Button { + id: panelBlur + Layout.fillWidth: true + text: i18n("Blur") + checked: plasmoid.configuration.blurEnabled + checkable: true + enabled: showBackground.checked + tooltip: i18n("Background is blurred underneath") + + onClicked: { + plasmoid.configuration.blurEnabled = checked + } + } - RowLayout { - Layout.fillWidth: true - Layout.leftMargin: units.smallSpacing * 2 - spacing: 2 - visible: dialog.expertLevel + PlasmaComponents.Button { + id: panelShadows + Layout.fillWidth: true + text: i18n("Shadows") + checked: plasmoid.configuration.panelShadows + checkable: true + enabled: showBackground.checked + tooltip: i18n("Background shows its shadows") - PlasmaComponents.Button { - id: panelBlur - Layout.fillWidth: true - text: i18n("Blur") - checked: plasmoid.configuration.blurEnabled - checkable: true - enabled: showBackground.checked - tooltip: i18n("Background is blurred underneath") + onClicked: { + plasmoid.configuration.panelShadows = checked + } + } - onClicked: { - plasmoid.configuration.blurEnabled = checked + PlasmaComponents.Button { + id: solidBackground + Layout.fillWidth: true + text: i18n("Outline") + checked: plasmoid.configuration.panelOutline + checkable: true + enabled: showBackground.checked && Latte.WindowSystem.compositingActive + tooltip: i18n("Background draws a line for its borders. You can set the line size from Latte Preferences") + + onClicked: { + plasmoid.configuration.panelOutline = !plasmoid.configuration.panelOutline; + } } } - PlasmaComponents.Button { - id: panelShadows - Layout.fillWidth: true - text: i18n("Shadows") - checked: plasmoid.configuration.panelShadows - checkable: true + LatteComponents.SubHeader { + visible: dialog.expertLevel + text: i18nc("dynamic visibility for background", "Dynamic Visibility") + } + + LatteComponents.CheckBox { + id: solidForMaximizedChk + Layout.maximumWidth: (dialog.appliedWidth - units.smallSpacing * 2) - 3*units.smallSpacing + text: i18n("Prefer opaque background when touching any window") + checked: plasmoid.configuration.solidBackgroundForMaximized + tooltip: i18n("Background removes its transparency setting when a window is touching") enabled: showBackground.checked - tooltip: i18n("Background shows its shadows") + visible: dialog.expertLevel onClicked: { - plasmoid.configuration.panelShadows = checked + plasmoid.configuration.solidBackgroundForMaximized = checked; } } - PlasmaComponents.Button { - id: solidBackground - Layout.fillWidth: true - text: i18n("Outline") - checked: plasmoid.configuration.panelOutline - checkable: true - enabled: showBackground.checked && Latte.WindowSystem.compositingActive - tooltip: i18n("Background draws a line for its borders. You can set the line size from Latte Preferences") + PlasmaComponents.CheckBox { + id: onlyOnMaximizedChk + text: i18n("Hide background when not needed") + checked: plasmoid.configuration.backgroundOnlyOnMaximized + tooltip: i18n("Background becomes hidden except when a window is touching or the desktop background is busy") + enabled: showBackground.checked + visible: dialog.expertLevel onClicked: { - plasmoid.configuration.panelOutline = !plasmoid.configuration.panelOutline; + plasmoid.configuration.backgroundOnlyOnMaximized = checked; } } - } - - LatteComponents.SubHeader { - visible: dialog.expertLevel - text: i18nc("dynamic visibility for background", "Dynamic Visibility") - } - - LatteComponents.CheckBox { - id: solidForMaximizedChk - Layout.leftMargin: units.smallSpacing * 2 - Layout.maximumWidth: (dialog.appliedWidth - units.smallSpacing * 2) - 3*units.smallSpacing - text: i18n("Prefer opaque background when touching any window") - checked: plasmoid.configuration.solidBackgroundForMaximized - tooltip: i18n("Background removes its transparency setting when a window is touching") - enabled: showBackground.checked - visible: dialog.expertLevel - - onClicked: { - plasmoid.configuration.solidBackgroundForMaximized = checked; - } - } - PlasmaComponents.CheckBox { - id: onlyOnMaximizedChk - Layout.leftMargin: units.smallSpacing * 2 - text: i18n("Hide background when not needed") - checked: plasmoid.configuration.backgroundOnlyOnMaximized - tooltip: i18n("Background becomes hidden except when a window is touching or the desktop background is busy") - enabled: showBackground.checked - visible: dialog.expertLevel + PlasmaComponents.CheckBox { + id: hideShadowsOnMaximizedChk + text: i18n("Hide background shadow for maximized windows") + checked: plasmoid.configuration.disablePanelShadowForMaximized + tooltip: i18n("Background shadows become hidden when an active maximized window is touching the view") + enabled: showBackground.checked + visible: dialog.expertLevel - onClicked: { - plasmoid.configuration.backgroundOnlyOnMaximized = checked; + onClicked: { + plasmoid.configuration.disablePanelShadowForMaximized = checked; + } } - } - PlasmaComponents.CheckBox { - id: hideShadowsOnMaximizedChk - Layout.leftMargin: units.smallSpacing * 2 - text: i18n("Hide background shadow for maximized windows") - checked: plasmoid.configuration.disablePanelShadowForMaximized - tooltip: i18n("Background shadows become hidden when an active maximized window is touching the view") - enabled: showBackground.checked - visible: dialog.expertLevel - - onClicked: { - plasmoid.configuration.disablePanelShadowForMaximized = checked; + LatteComponents.SubHeader { + visible: dialog.expertLevel + text: i18n("Exceptions") } - } - LatteComponents.SubHeader { - visible: dialog.expertLevel - text: i18n("Exceptions") - } + LatteComponents.CheckBox { + id: solidForPopupsChk + Layout.maximumWidth: (dialog.appliedWidth - units.smallSpacing * 2) - 3*units.smallSpacing + text: i18n("Prefer Plasma background and colors for expanded applets") + checked: plasmoid.configuration.plasmaBackgroundForPopups + tooltip: i18n("Background becomes opaque in plasma style when applets are expanded") + enabled: showBackground.checked + visible: dialog.expertLevel - LatteComponents.CheckBox { - id: solidForPopupsChk - Layout.leftMargin: units.smallSpacing * 2 - Layout.maximumWidth: (dialog.appliedWidth - units.smallSpacing * 2) - 3*units.smallSpacing - text: i18n("Prefer Plasma background and colors for expanded applets") - checked: plasmoid.configuration.plasmaBackgroundForPopups - tooltip: i18n("Background becomes opaque in plasma style when applets are expanded") - enabled: showBackground.checked - visible: dialog.expertLevel - - onClicked: { - plasmoid.configuration.plasmaBackgroundForPopups = checked; + onClicked: { + plasmoid.configuration.plasmaBackgroundForPopups = checked; + } } } } diff --git a/shell/package/contents/configuration/pages/BehaviorConfig.qml b/shell/package/contents/configuration/pages/BehaviorConfig.qml index 40c4ee024..640f1bf37 100644 --- a/shell/package/contents/configuration/pages/BehaviorConfig.qml +++ b/shell/package/contents/configuration/pages/BehaviorConfig.qml @@ -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 + } } } } diff --git a/shell/package/contents/configuration/pages/EffectsConfig.qml b/shell/package/contents/configuration/pages/EffectsConfig.qml index 5337c51fe..b122ccaaf 100644 --- a/shell/package/contents/configuration/pages/EffectsConfig.qml +++ b/shell/package/contents/configuration/pages/EffectsConfig.qml @@ -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: { diff --git a/shell/package/contents/configuration/pages/TasksConfig.qml b/shell/package/contents/configuration/pages/TasksConfig.qml index 392688cba..ea341974c 100644 --- a/shell/package/contents/configuration/pages/TasksConfig.qml +++ b/shell/package/contents/configuration/pages/TasksConfig.qml @@ -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 synchronization between different views in the same layout") - //! 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 synchronization between different views in the same layout") + //! 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 synchronization between different views and between different layouts") + 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 synchronization between different views and between different layouts") - 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