controlcenter: taskbar panel layout reorg
This commit is contained in:
parent
1850a844ee
commit
821ee4389a
3 changed files with 380 additions and 324 deletions
|
|
@ -10,6 +10,7 @@ StyledRect {
|
||||||
|
|
||||||
default property alias content: contentColumn.data
|
default property alias content: contentColumn.data
|
||||||
property real contentSpacing: Appearance.spacing.larger
|
property real contentSpacing: Appearance.spacing.larger
|
||||||
|
property bool alignTop: false
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
implicitHeight: contentColumn.implicitHeight + Appearance.padding.large * 2
|
implicitHeight: contentColumn.implicitHeight + Appearance.padding.large * 2
|
||||||
|
|
@ -22,7 +23,8 @@ StyledRect {
|
||||||
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.top: root.alignTop ? parent.top : undefined
|
||||||
|
anchors.verticalCenter: root.alignTop ? undefined : parent.verticalCenter
|
||||||
anchors.margins: Appearance.padding.large
|
anchors.margins: Appearance.padding.large
|
||||||
|
|
||||||
spacing: root.contentSpacing
|
spacing: root.contentSpacing
|
||||||
|
|
|
||||||
|
|
@ -113,6 +113,24 @@ StyledRect {
|
||||||
button.isChecked = root.rootItem.showLockStatus;
|
button.isChecked = root.rootItem.showLockStatus;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onTrayBackgroundChanged() {
|
||||||
|
if (modelData.propertyName === "trayBackground") {
|
||||||
|
button.isChecked = root.rootItem.trayBackground;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function onTrayCompactChanged() {
|
||||||
|
if (modelData.propertyName === "trayCompact") {
|
||||||
|
button.isChecked = root.rootItem.trayCompact;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function onTrayRecolourChanged() {
|
||||||
|
if (modelData.propertyName === "trayRecolour") {
|
||||||
|
button.isChecked = root.rootItem.trayRecolour;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Match utilities Toggles radius styling
|
// Match utilities Toggles radius styling
|
||||||
|
|
|
||||||
|
|
@ -161,11 +161,7 @@ Item {
|
||||||
|
|
||||||
spacing: Appearance.spacing.small
|
spacing: Appearance.spacing.small
|
||||||
|
|
||||||
readonly property bool allSectionsExpanded:
|
readonly property bool allSectionsExpanded: true
|
||||||
clockSection.expanded &&
|
|
||||||
barBehaviorSection.expanded &&
|
|
||||||
traySettingsSection.expanded &&
|
|
||||||
workspacesSection.expanded
|
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
spacing: Appearance.spacing.smaller
|
spacing: Appearance.spacing.smaller
|
||||||
|
|
@ -185,11 +181,7 @@ Item {
|
||||||
type: IconButton.Text
|
type: IconButton.Text
|
||||||
label.animate: true
|
label.animate: true
|
||||||
onClicked: {
|
onClicked: {
|
||||||
const shouldExpand = !sidebarLayout.allSectionsExpanded;
|
// No collapsible sections remaining
|
||||||
clockSection.expanded = shouldExpand;
|
|
||||||
barBehaviorSection.expanded = shouldExpand;
|
|
||||||
traySettingsSection.expanded = shouldExpand;
|
|
||||||
workspacesSection.expanded = shouldExpand;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -258,345 +250,389 @@ Item {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
CollapsibleSection {
|
RowLayout {
|
||||||
id: clockSection
|
Layout.fillWidth: true
|
||||||
title: qsTr("Clock")
|
spacing: Appearance.spacing.small
|
||||||
|
|
||||||
SwitchRow {
|
ColumnLayout {
|
||||||
label: qsTr("Show clock icon")
|
Layout.fillWidth: true
|
||||||
checked: root.clockShowIcon
|
Layout.alignment: Qt.AlignTop
|
||||||
onToggled: checked => {
|
spacing: 0
|
||||||
root.clockShowIcon = checked;
|
|
||||||
root.saveConfig();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
CollapsibleSection {
|
SectionContainer {
|
||||||
id: barBehaviorSection
|
|
||||||
title: qsTr("Bar Behavior")
|
|
||||||
|
|
||||||
SwitchRow {
|
|
||||||
label: qsTr("Persistent")
|
|
||||||
checked: root.persistent
|
|
||||||
onToggled: checked => {
|
|
||||||
root.persistent = checked;
|
|
||||||
root.saveConfig();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SwitchRow {
|
|
||||||
label: qsTr("Show on hover")
|
|
||||||
checked: root.showOnHover
|
|
||||||
onToggled: checked => {
|
|
||||||
root.showOnHover = checked;
|
|
||||||
root.saveConfig();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SectionContainer {
|
|
||||||
contentSpacing: Appearance.spacing.normal
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
spacing: Appearance.spacing.small
|
alignTop: true
|
||||||
|
|
||||||
|
StyledText {
|
||||||
|
text: qsTr("Workspaces")
|
||||||
|
font.pointSize: Appearance.font.size.normal
|
||||||
|
}
|
||||||
|
|
||||||
|
StyledRect {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
implicitHeight: workspacesShownRow.implicitHeight + Appearance.padding.large * 2
|
||||||
|
radius: Appearance.rounding.normal
|
||||||
|
color: Colours.layer(Colours.palette.m3surfaceContainer, 2)
|
||||||
|
|
||||||
|
Behavior on implicitHeight {
|
||||||
|
Anim {}
|
||||||
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.fillWidth: true
|
id: workspacesShownRow
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.margins: Appearance.padding.large
|
||||||
spacing: Appearance.spacing.normal
|
spacing: Appearance.spacing.normal
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: qsTr("Drag threshold")
|
|
||||||
font.pointSize: Appearance.font.size.normal
|
|
||||||
}
|
|
||||||
|
|
||||||
Item {
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
text: qsTr("Shown")
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledRect {
|
CustomSpinBox {
|
||||||
Layout.preferredWidth: 70
|
min: 1
|
||||||
implicitHeight: dragThresholdInput.implicitHeight + Appearance.padding.small * 2
|
max: 20
|
||||||
color: dragThresholdInputHover.containsMouse || dragThresholdInput.activeFocus
|
value: root.workspacesShown
|
||||||
? Colours.layer(Colours.palette.m3surfaceContainer, 3)
|
onValueModified: value => {
|
||||||
: Colours.layer(Colours.palette.m3surfaceContainer, 2)
|
root.workspacesShown = value;
|
||||||
radius: Appearance.rounding.small
|
root.saveConfig();
|
||||||
border.width: 1
|
|
||||||
border.color: dragThresholdInput.activeFocus
|
|
||||||
? Colours.palette.m3primary
|
|
||||||
: Qt.alpha(Colours.palette.m3outline, 0.3)
|
|
||||||
|
|
||||||
Behavior on color { CAnim {} }
|
|
||||||
Behavior on border.color { CAnim {} }
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
id: dragThresholdInputHover
|
|
||||||
anchors.fill: parent
|
|
||||||
hoverEnabled: true
|
|
||||||
cursorShape: Qt.IBeamCursor
|
|
||||||
acceptedButtons: Qt.NoButton
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
StyledTextField {
|
StyledRect {
|
||||||
id: dragThresholdInput
|
Layout.fillWidth: true
|
||||||
anchors.centerIn: parent
|
implicitHeight: workspacesActiveIndicatorRow.implicitHeight + Appearance.padding.large * 2
|
||||||
width: parent.width - Appearance.padding.normal
|
radius: Appearance.rounding.normal
|
||||||
horizontalAlignment: TextInput.AlignHCenter
|
color: Colours.layer(Colours.palette.m3surfaceContainer, 2)
|
||||||
validator: IntValidator { bottom: 0; top: 100 }
|
|
||||||
|
Behavior on implicitHeight {
|
||||||
Component.onCompleted: {
|
Anim {}
|
||||||
text = root.dragThreshold.toString();
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
id: workspacesActiveIndicatorRow
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.margins: Appearance.padding.large
|
||||||
|
spacing: Appearance.spacing.normal
|
||||||
|
|
||||||
|
StyledText {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: qsTr("Active indicator")
|
||||||
|
}
|
||||||
|
|
||||||
|
StyledSwitch {
|
||||||
|
checked: root.workspacesActiveIndicator
|
||||||
|
onToggled: {
|
||||||
|
root.workspacesActiveIndicator = checked;
|
||||||
|
root.saveConfig();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
StyledRect {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
implicitHeight: workspacesOccupiedBgRow.implicitHeight + Appearance.padding.large * 2
|
||||||
|
radius: Appearance.rounding.normal
|
||||||
|
color: Colours.layer(Colours.palette.m3surfaceContainer, 2)
|
||||||
|
|
||||||
|
Behavior on implicitHeight {
|
||||||
|
Anim {}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
id: workspacesOccupiedBgRow
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.margins: Appearance.padding.large
|
||||||
|
spacing: Appearance.spacing.normal
|
||||||
|
|
||||||
|
StyledText {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: qsTr("Occupied background")
|
||||||
|
}
|
||||||
|
|
||||||
|
StyledSwitch {
|
||||||
|
checked: root.workspacesOccupiedBg
|
||||||
|
onToggled: {
|
||||||
|
root.workspacesOccupiedBg = checked;
|
||||||
|
root.saveConfig();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
StyledRect {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
implicitHeight: workspacesShowWindowsRow.implicitHeight + Appearance.padding.large * 2
|
||||||
|
radius: Appearance.rounding.normal
|
||||||
|
color: Colours.layer(Colours.palette.m3surfaceContainer, 2)
|
||||||
|
|
||||||
|
Behavior on implicitHeight {
|
||||||
|
Anim {}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
id: workspacesShowWindowsRow
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.margins: Appearance.padding.large
|
||||||
|
spacing: Appearance.spacing.normal
|
||||||
|
|
||||||
|
StyledText {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: qsTr("Show windows")
|
||||||
|
}
|
||||||
|
|
||||||
|
StyledSwitch {
|
||||||
|
checked: root.workspacesShowWindows
|
||||||
|
onToggled: {
|
||||||
|
root.workspacesShowWindows = checked;
|
||||||
|
root.saveConfig();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
StyledRect {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
implicitHeight: workspacesPerMonitorRow.implicitHeight + Appearance.padding.large * 2
|
||||||
|
radius: Appearance.rounding.normal
|
||||||
|
color: Colours.layer(Colours.palette.m3surfaceContainer, 2)
|
||||||
|
|
||||||
|
Behavior on implicitHeight {
|
||||||
|
Anim {}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
id: workspacesPerMonitorRow
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.margins: Appearance.padding.large
|
||||||
|
spacing: Appearance.spacing.normal
|
||||||
|
|
||||||
|
StyledText {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: qsTr("Per monitor workspaces")
|
||||||
|
}
|
||||||
|
|
||||||
|
StyledSwitch {
|
||||||
|
checked: root.workspacesPerMonitor
|
||||||
|
onToggled: {
|
||||||
|
root.workspacesPerMonitor = checked;
|
||||||
|
root.saveConfig();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.alignment: Qt.AlignTop
|
||||||
|
spacing: Appearance.spacing.small
|
||||||
|
|
||||||
|
SectionContainer {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
alignTop: true
|
||||||
|
|
||||||
|
StyledText {
|
||||||
|
text: qsTr("Clock")
|
||||||
|
font.pointSize: Appearance.font.size.normal
|
||||||
|
}
|
||||||
|
|
||||||
|
SwitchRow {
|
||||||
|
label: qsTr("Show clock icon")
|
||||||
|
checked: root.clockShowIcon
|
||||||
|
onToggled: checked => {
|
||||||
|
root.clockShowIcon = checked;
|
||||||
|
root.saveConfig();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SectionContainer {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
alignTop: true
|
||||||
|
|
||||||
|
ConnectedButtonGroup {
|
||||||
|
rootItem: root
|
||||||
|
title: qsTr("Tray Settings")
|
||||||
|
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
label: qsTr("Background"),
|
||||||
|
propertyName: "trayBackground",
|
||||||
|
onToggled: function(checked) {
|
||||||
|
root.trayBackground = checked;
|
||||||
|
root.saveConfig();
|
||||||
}
|
}
|
||||||
|
},
|
||||||
onTextChanged: {
|
{
|
||||||
if (activeFocus) {
|
label: qsTr("Compact"),
|
||||||
const val = parseInt(text);
|
propertyName: "trayCompact",
|
||||||
if (!isNaN(val) && val >= 0 && val <= 100) {
|
onToggled: function(checked) {
|
||||||
root.dragThreshold = val;
|
root.trayCompact = checked;
|
||||||
root.saveConfig();
|
root.saveConfig();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: qsTr("Recolour"),
|
||||||
|
propertyName: "trayRecolour",
|
||||||
|
onToggled: function(checked) {
|
||||||
|
root.trayRecolour = checked;
|
||||||
|
root.saveConfig();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.alignment: Qt.AlignTop
|
||||||
|
spacing: 0
|
||||||
|
|
||||||
|
SectionContainer {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
alignTop: true
|
||||||
|
|
||||||
|
StyledText {
|
||||||
|
text: qsTr("Bar Behavior")
|
||||||
|
font.pointSize: Appearance.font.size.normal
|
||||||
|
}
|
||||||
|
|
||||||
|
SwitchRow {
|
||||||
|
label: qsTr("Persistent")
|
||||||
|
checked: root.persistent
|
||||||
|
onToggled: checked => {
|
||||||
|
root.persistent = checked;
|
||||||
|
root.saveConfig();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SwitchRow {
|
||||||
|
label: qsTr("Show on hover")
|
||||||
|
checked: root.showOnHover
|
||||||
|
onToggled: checked => {
|
||||||
|
root.showOnHover = checked;
|
||||||
|
root.saveConfig();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SectionContainer {
|
||||||
|
contentSpacing: Appearance.spacing.normal
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
spacing: Appearance.spacing.small
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
spacing: Appearance.spacing.normal
|
||||||
|
|
||||||
|
StyledText {
|
||||||
|
text: qsTr("Drag threshold")
|
||||||
|
font.pointSize: Appearance.font.size.normal
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
|
||||||
|
StyledRect {
|
||||||
|
Layout.preferredWidth: 70
|
||||||
|
implicitHeight: dragThresholdInput.implicitHeight + Appearance.padding.small * 2
|
||||||
|
color: dragThresholdInputHover.containsMouse || dragThresholdInput.activeFocus
|
||||||
|
? Colours.layer(Colours.palette.m3surfaceContainer, 3)
|
||||||
|
: Colours.layer(Colours.palette.m3surfaceContainer, 2)
|
||||||
|
radius: Appearance.rounding.small
|
||||||
|
border.width: 1
|
||||||
|
border.color: dragThresholdInput.activeFocus
|
||||||
|
? Colours.palette.m3primary
|
||||||
|
: Qt.alpha(Colours.palette.m3outline, 0.3)
|
||||||
|
|
||||||
|
Behavior on color { CAnim {} }
|
||||||
|
Behavior on border.color { CAnim {} }
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: dragThresholdInputHover
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
cursorShape: Qt.IBeamCursor
|
||||||
|
acceptedButtons: Qt.NoButton
|
||||||
|
}
|
||||||
|
|
||||||
|
StyledTextField {
|
||||||
|
id: dragThresholdInput
|
||||||
|
anchors.centerIn: parent
|
||||||
|
width: parent.width - Appearance.padding.normal
|
||||||
|
horizontalAlignment: TextInput.AlignHCenter
|
||||||
|
validator: IntValidator { bottom: 0; top: 100 }
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
text = root.dragThreshold.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
onTextChanged: {
|
||||||
|
if (activeFocus) {
|
||||||
|
const val = parseInt(text);
|
||||||
|
if (!isNaN(val) && val >= 0 && val <= 100) {
|
||||||
|
root.dragThreshold = val;
|
||||||
|
root.saveConfig();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onEditingFinished: {
|
||||||
|
const val = parseInt(text);
|
||||||
|
if (isNaN(val) || val < 0 || val > 100) {
|
||||||
|
text = root.dragThreshold.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onEditingFinished: {
|
|
||||||
const val = parseInt(text);
|
StyledText {
|
||||||
if (isNaN(val) || val < 0 || val > 100) {
|
text: "px"
|
||||||
text = root.dragThreshold.toString();
|
color: Colours.palette.m3outline
|
||||||
|
font.pointSize: Appearance.font.size.normal
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
StyledSlider {
|
||||||
|
id: dragThresholdSlider
|
||||||
|
|
||||||
|
Layout.fillWidth: true
|
||||||
|
implicitHeight: Appearance.padding.normal * 3
|
||||||
|
|
||||||
|
from: 0
|
||||||
|
to: 100
|
||||||
|
value: root.dragThreshold
|
||||||
|
onMoved: {
|
||||||
|
root.dragThreshold = Math.round(dragThresholdSlider.value);
|
||||||
|
if (!dragThresholdInput.activeFocus) {
|
||||||
|
dragThresholdInput.text = Math.round(dragThresholdSlider.value).toString();
|
||||||
}
|
}
|
||||||
|
root.saveConfig();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
|
||||||
text: "px"
|
|
||||||
color: Colours.palette.m3outline
|
|
||||||
font.pointSize: Appearance.font.size.normal
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
StyledSlider {
|
|
||||||
id: dragThresholdSlider
|
|
||||||
|
|
||||||
Layout.fillWidth: true
|
|
||||||
implicitHeight: Appearance.padding.normal * 3
|
|
||||||
|
|
||||||
from: 0
|
|
||||||
to: 100
|
|
||||||
value: root.dragThreshold
|
|
||||||
onMoved: {
|
|
||||||
root.dragThreshold = Math.round(dragThresholdSlider.value);
|
|
||||||
if (!dragThresholdInput.activeFocus) {
|
|
||||||
dragThresholdInput.text = Math.round(dragThresholdSlider.value).toString();
|
|
||||||
}
|
|
||||||
root.saveConfig();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CollapsibleSection {
|
|
||||||
id: traySettingsSection
|
|
||||||
title: qsTr("Tray Settings")
|
|
||||||
|
|
||||||
SwitchRow {
|
|
||||||
label: qsTr("Background")
|
|
||||||
checked: root.trayBackground
|
|
||||||
onToggled: checked => {
|
|
||||||
root.trayBackground = checked;
|
|
||||||
root.saveConfig();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SwitchRow {
|
|
||||||
label: qsTr("Compact")
|
|
||||||
checked: root.trayCompact
|
|
||||||
onToggled: checked => {
|
|
||||||
root.trayCompact = checked;
|
|
||||||
root.saveConfig();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SwitchRow {
|
|
||||||
label: qsTr("Recolour")
|
|
||||||
checked: root.trayRecolour
|
|
||||||
onToggled: checked => {
|
|
||||||
root.trayRecolour = checked;
|
|
||||||
root.saveConfig();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
CollapsibleSection {
|
|
||||||
id: workspacesSection
|
|
||||||
title: qsTr("Workspaces")
|
|
||||||
|
|
||||||
StyledRect {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
implicitHeight: workspacesShownRow.implicitHeight + Appearance.padding.large * 2
|
|
||||||
radius: Appearance.rounding.normal
|
|
||||||
color: Colours.tPalette.m3surfaceContainer
|
|
||||||
|
|
||||||
Behavior on implicitHeight {
|
|
||||||
Anim {}
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
id: workspacesShownRow
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
anchors.margins: Appearance.padding.large
|
|
||||||
spacing: Appearance.spacing.normal
|
|
||||||
|
|
||||||
StyledText {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
text: qsTr("Shown")
|
|
||||||
}
|
|
||||||
|
|
||||||
CustomSpinBox {
|
|
||||||
min: 1
|
|
||||||
max: 20
|
|
||||||
value: root.workspacesShown
|
|
||||||
onValueModified: value => {
|
|
||||||
root.workspacesShown = value;
|
|
||||||
root.saveConfig();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
StyledRect {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
implicitHeight: workspacesActiveIndicatorRow.implicitHeight + Appearance.padding.large * 2
|
|
||||||
radius: Appearance.rounding.normal
|
|
||||||
color: Colours.tPalette.m3surfaceContainer
|
|
||||||
|
|
||||||
Behavior on implicitHeight {
|
|
||||||
Anim {}
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
id: workspacesActiveIndicatorRow
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
anchors.margins: Appearance.padding.large
|
|
||||||
spacing: Appearance.spacing.normal
|
|
||||||
|
|
||||||
StyledText {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
text: qsTr("Active indicator")
|
|
||||||
}
|
|
||||||
|
|
||||||
StyledSwitch {
|
|
||||||
checked: root.workspacesActiveIndicator
|
|
||||||
onToggled: {
|
|
||||||
root.workspacesActiveIndicator = checked;
|
|
||||||
root.saveConfig();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
StyledRect {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
implicitHeight: workspacesOccupiedBgRow.implicitHeight + Appearance.padding.large * 2
|
|
||||||
radius: Appearance.rounding.normal
|
|
||||||
color: Colours.tPalette.m3surfaceContainer
|
|
||||||
|
|
||||||
Behavior on implicitHeight {
|
|
||||||
Anim {}
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
id: workspacesOccupiedBgRow
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
anchors.margins: Appearance.padding.large
|
|
||||||
spacing: Appearance.spacing.normal
|
|
||||||
|
|
||||||
StyledText {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
text: qsTr("Occupied background")
|
|
||||||
}
|
|
||||||
|
|
||||||
StyledSwitch {
|
|
||||||
checked: root.workspacesOccupiedBg
|
|
||||||
onToggled: {
|
|
||||||
root.workspacesOccupiedBg = checked;
|
|
||||||
root.saveConfig();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
StyledRect {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
implicitHeight: workspacesShowWindowsRow.implicitHeight + Appearance.padding.large * 2
|
|
||||||
radius: Appearance.rounding.normal
|
|
||||||
color: Colours.tPalette.m3surfaceContainer
|
|
||||||
|
|
||||||
Behavior on implicitHeight {
|
|
||||||
Anim {}
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
id: workspacesShowWindowsRow
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
anchors.margins: Appearance.padding.large
|
|
||||||
spacing: Appearance.spacing.normal
|
|
||||||
|
|
||||||
StyledText {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
text: qsTr("Show windows")
|
|
||||||
}
|
|
||||||
|
|
||||||
StyledSwitch {
|
|
||||||
checked: root.workspacesShowWindows
|
|
||||||
onToggled: {
|
|
||||||
root.workspacesShowWindows = checked;
|
|
||||||
root.saveConfig();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
StyledRect {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
implicitHeight: workspacesPerMonitorRow.implicitHeight + Appearance.padding.large * 2
|
|
||||||
radius: Appearance.rounding.normal
|
|
||||||
color: Colours.tPalette.m3surfaceContainer
|
|
||||||
|
|
||||||
Behavior on implicitHeight {
|
|
||||||
Anim {}
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
id: workspacesPerMonitorRow
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
anchors.margins: Appearance.padding.large
|
|
||||||
spacing: Appearance.spacing.normal
|
|
||||||
|
|
||||||
StyledText {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
text: qsTr("Per monitor workspaces")
|
|
||||||
}
|
|
||||||
|
|
||||||
StyledSwitch {
|
|
||||||
checked: root.workspacesPerMonitor
|
|
||||||
onToggled: {
|
|
||||||
root.workspacesPerMonitor = checked;
|
|
||||||
root.saveConfig();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue