controlcenter: corrected all panels edge-to-edge containers

This commit is contained in:
ATMDA 2025-11-15 16:44:11 -05:00
parent 442b49e0e1
commit b0006f2f11
6 changed files with 493 additions and 272 deletions

View file

@ -12,6 +12,7 @@ import qs.config
import qs.utils import qs.utils
import Caelestia.Models import Caelestia.Models
import Quickshell import Quickshell
import Quickshell.Widgets
import QtQuick import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
@ -47,26 +48,6 @@ RowLayout {
spacing: 0 spacing: 0
function collapseAllSections(exceptSection) {
if (exceptSection !== themeModeSection)
themeModeSection.expanded = false;
if (exceptSection !== colorVariantSection)
colorVariantSection.expanded = false;
if (exceptSection !== colorSchemeSection)
colorSchemeSection.expanded = false;
if (exceptSection !== animationsSection)
animationsSection.expanded = false;
if (exceptSection !== fontsSection)
fontsSection.expanded = false;
if (exceptSection !== scalesSection)
scalesSection.expanded = false;
if (exceptSection !== transparencySection)
transparencySection.expanded = false;
if (exceptSection !== borderSection)
borderSection.expanded = false;
if (exceptSection !== backgroundSection)
backgroundSection.expanded = false;
}
function saveConfig() { function saveConfig() {
// Update animations // Update animations
@ -110,12 +91,63 @@ RowLayout {
Layout.minimumWidth: 420 Layout.minimumWidth: 420
Layout.fillHeight: true Layout.fillHeight: true
ClippingRectangle {
id: leftAppearanceClippingRect
anchors.fill: parent
anchors.margins: Appearance.padding.normal
anchors.leftMargin: 0
anchors.rightMargin: Appearance.padding.normal / 2
radius: leftAppearanceBorder.innerRadius
color: "transparent"
Loader {
id: leftAppearanceLoader
anchors.fill: parent
anchors.margins: Appearance.padding.large + Appearance.padding.normal
anchors.leftMargin: Appearance.padding.large
anchors.rightMargin: Appearance.padding.large + Appearance.padding.normal / 2
asynchronous: true
sourceComponent: appearanceLeftContentComponent
property var rootPane: root
}
}
InnerBorder {
id: leftAppearanceBorder
leftThickness: 0
rightThickness: Appearance.padding.normal / 2
}
Component {
id: appearanceLeftContentComponent
StyledFlickable { StyledFlickable {
id: sidebarFlickable id: sidebarFlickable
anchors.fill: parent readonly property var rootPane: leftAppearanceLoader.rootPane
flickableDirection: Flickable.VerticalFlick flickableDirection: Flickable.VerticalFlick
contentHeight: sidebarLayout.height contentHeight: sidebarLayout.height
function collapseAllSections(exceptSection) {
if (exceptSection !== themeModeSection)
themeModeSection.expanded = false;
if (exceptSection !== colorVariantSection)
colorVariantSection.expanded = false;
if (exceptSection !== colorSchemeSection)
colorSchemeSection.expanded = false;
if (exceptSection !== animationsSection)
animationsSection.expanded = false;
if (exceptSection !== fontsSection)
fontsSection.expanded = false;
if (exceptSection !== scalesSection)
scalesSection.expanded = false;
if (exceptSection !== transparencySection)
transparencySection.expanded = false;
if (exceptSection !== borderSection)
borderSection.expanded = false;
if (exceptSection !== backgroundSection)
backgroundSection.expanded = false;
}
StyledScrollBar.vertical: StyledScrollBar { StyledScrollBar.vertical: StyledScrollBar {
flickable: sidebarFlickable flickable: sidebarFlickable
} }
@ -124,11 +156,6 @@ RowLayout {
id: sidebarLayout id: sidebarLayout
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top
anchors.margins: Appearance.padding.large + Appearance.padding.normal
anchors.leftMargin: Appearance.padding.large
anchors.rightMargin: Appearance.padding.large + Appearance.padding.normal / 2
spacing: Appearance.spacing.small spacing: Appearance.spacing.small
RowLayout { RowLayout {
@ -150,7 +177,7 @@ RowLayout {
title: qsTr("Theme mode") title: qsTr("Theme mode")
description: qsTr("Light or dark theme") description: qsTr("Light or dark theme")
onToggleRequested: { onToggleRequested: {
root.collapseAllSections(themeModeSection); sidebarFlickable.collapseAllSections(themeModeSection);
} }
SwitchRow { SwitchRow {
@ -167,7 +194,7 @@ RowLayout {
title: qsTr("Color variant") title: qsTr("Color variant")
description: qsTr("Material theme variant") description: qsTr("Material theme variant")
onToggleRequested: { onToggleRequested: {
root.collapseAllSections(colorVariantSection); sidebarFlickable.collapseAllSections(colorVariantSection);
} }
StyledListView { StyledListView {
@ -257,7 +284,7 @@ RowLayout {
title: qsTr("Color scheme") title: qsTr("Color scheme")
description: qsTr("Available color schemes") description: qsTr("Available color schemes")
onToggleRequested: { onToggleRequested: {
root.collapseAllSections(colorSchemeSection); sidebarFlickable.collapseAllSections(colorSchemeSection);
} }
StyledListView { StyledListView {
@ -401,7 +428,7 @@ RowLayout {
id: animationsSection id: animationsSection
title: qsTr("Animations") title: qsTr("Animations")
onToggleRequested: { onToggleRequested: {
root.collapseAllSections(animationsSection); sidebarFlickable.collapseAllSections(animationsSection);
} }
SpinBoxRow { SpinBoxRow {
@ -409,10 +436,10 @@ RowLayout {
min: 0.1 min: 0.1
max: 5 max: 5
step: 0.1 step: 0.1
value: root.animDurationsScale value: rootPane.animDurationsScale
onValueModified: value => { onValueModified: value => {
root.animDurationsScale = value; rootPane.animDurationsScale = value;
root.saveConfig(); rootPane.saveConfig();
} }
} }
} }
@ -421,7 +448,7 @@ RowLayout {
id: fontsSection id: fontsSection
title: qsTr("Fonts") title: qsTr("Fonts")
onToggleRequested: { onToggleRequested: {
root.collapseAllSections(fontsSection); sidebarFlickable.collapseAllSections(fontsSection);
} }
StyledText { StyledText {
@ -449,7 +476,7 @@ RowLayout {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
readonly property bool isCurrent: modelData === root.fontFamilyMaterial readonly property bool isCurrent: modelData === rootPane.fontFamilyMaterial
color: Qt.alpha(Colours.tPalette.m3surfaceContainer, isCurrent ? Colours.tPalette.m3surfaceContainer.a : 0) color: Qt.alpha(Colours.tPalette.m3surfaceContainer, isCurrent ? Colours.tPalette.m3surfaceContainer.a : 0)
radius: Appearance.rounding.normal radius: Appearance.rounding.normal
border.width: isCurrent ? 1 : 0 border.width: isCurrent ? 1 : 0
@ -457,8 +484,8 @@ RowLayout {
StateLayer { StateLayer {
function onClicked(): void { function onClicked(): void {
root.fontFamilyMaterial = modelData; rootPane.fontFamilyMaterial = modelData;
root.saveConfig(); rootPane.saveConfig();
} }
} }
@ -522,7 +549,7 @@ RowLayout {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
readonly property bool isCurrent: modelData === root.fontFamilyMono readonly property bool isCurrent: modelData === rootPane.fontFamilyMono
color: Qt.alpha(Colours.tPalette.m3surfaceContainer, isCurrent ? Colours.tPalette.m3surfaceContainer.a : 0) color: Qt.alpha(Colours.tPalette.m3surfaceContainer, isCurrent ? Colours.tPalette.m3surfaceContainer.a : 0)
radius: Appearance.rounding.normal radius: Appearance.rounding.normal
border.width: isCurrent ? 1 : 0 border.width: isCurrent ? 1 : 0
@ -530,8 +557,8 @@ RowLayout {
StateLayer { StateLayer {
function onClicked(): void { function onClicked(): void {
root.fontFamilyMono = modelData; rootPane.fontFamilyMono = modelData;
root.saveConfig(); rootPane.saveConfig();
} }
} }
@ -595,7 +622,7 @@ RowLayout {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
readonly property bool isCurrent: modelData === root.fontFamilySans readonly property bool isCurrent: modelData === rootPane.fontFamilySans
color: Qt.alpha(Colours.tPalette.m3surfaceContainer, isCurrent ? Colours.tPalette.m3surfaceContainer.a : 0) color: Qt.alpha(Colours.tPalette.m3surfaceContainer, isCurrent ? Colours.tPalette.m3surfaceContainer.a : 0)
radius: Appearance.rounding.normal radius: Appearance.rounding.normal
border.width: isCurrent ? 1 : 0 border.width: isCurrent ? 1 : 0
@ -603,8 +630,8 @@ RowLayout {
StateLayer { StateLayer {
function onClicked(): void { function onClicked(): void {
root.fontFamilySans = modelData; rootPane.fontFamilySans = modelData;
root.saveConfig(); rootPane.saveConfig();
} }
} }
@ -648,10 +675,10 @@ RowLayout {
min: 0.1 min: 0.1
max: 5 max: 5
step: 0.1 step: 0.1
value: root.fontSizeScale value: rootPane.fontSizeScale
onValueModified: value => { onValueModified: value => {
root.fontSizeScale = value; rootPane.fontSizeScale = value;
root.saveConfig(); rootPane.saveConfig();
} }
} }
} }
@ -660,7 +687,7 @@ RowLayout {
id: scalesSection id: scalesSection
title: qsTr("Scales") title: qsTr("Scales")
onToggleRequested: { onToggleRequested: {
root.collapseAllSections(scalesSection); sidebarFlickable.collapseAllSections(scalesSection);
} }
SpinBoxRow { SpinBoxRow {
@ -668,10 +695,10 @@ RowLayout {
min: 0.1 min: 0.1
max: 5 max: 5
step: 0.1 step: 0.1
value: root.paddingScale value: rootPane.paddingScale
onValueModified: value => { onValueModified: value => {
root.paddingScale = value; rootPane.paddingScale = value;
root.saveConfig(); rootPane.saveConfig();
} }
} }
@ -680,10 +707,10 @@ RowLayout {
min: 0.1 min: 0.1
max: 5 max: 5
step: 0.1 step: 0.1
value: root.roundingScale value: rootPane.roundingScale
onValueModified: value => { onValueModified: value => {
root.roundingScale = value; rootPane.roundingScale = value;
root.saveConfig(); rootPane.saveConfig();
} }
} }
@ -692,10 +719,10 @@ RowLayout {
min: 0.1 min: 0.1
max: 5 max: 5
step: 0.1 step: 0.1
value: root.spacingScale value: rootPane.spacingScale
onValueModified: value => { onValueModified: value => {
root.spacingScale = value; rootPane.spacingScale = value;
root.saveConfig(); rootPane.saveConfig();
} }
} }
} }
@ -704,15 +731,15 @@ RowLayout {
id: transparencySection id: transparencySection
title: qsTr("Transparency") title: qsTr("Transparency")
onToggleRequested: { onToggleRequested: {
root.collapseAllSections(transparencySection); sidebarFlickable.collapseAllSections(transparencySection);
} }
SwitchRow { SwitchRow {
label: qsTr("Transparency enabled") label: qsTr("Transparency enabled")
checked: root.transparencyEnabled checked: rootPane.transparencyEnabled
onToggled: checked => { onToggled: checked => {
root.transparencyEnabled = checked; rootPane.transparencyEnabled = checked;
root.saveConfig(); rootPane.saveConfig();
} }
} }
@ -737,7 +764,7 @@ RowLayout {
} }
StyledText { StyledText {
text: qsTr("%1%").arg(Math.round(root.transparencyBase * 100)) text: qsTr("%1%").arg(Math.round(rootPane.transparencyBase * 100))
color: Colours.palette.m3outline color: Colours.palette.m3outline
font.pointSize: Appearance.font.size.normal font.pointSize: Appearance.font.size.normal
} }
@ -751,10 +778,10 @@ RowLayout {
from: 0 from: 0
to: 100 to: 100
value: root.transparencyBase * 100 value: rootPane.transparencyBase * 100
onMoved: { onMoved: {
root.transparencyBase = baseSlider.value / 100; rootPane.transparencyBase = baseSlider.value / 100;
root.saveConfig(); rootPane.saveConfig();
} }
} }
} }
@ -781,7 +808,7 @@ RowLayout {
} }
StyledText { StyledText {
text: qsTr("%1%").arg(Math.round(root.transparencyLayers * 100)) text: qsTr("%1%").arg(Math.round(rootPane.transparencyLayers * 100))
color: Colours.palette.m3outline color: Colours.palette.m3outline
font.pointSize: Appearance.font.size.normal font.pointSize: Appearance.font.size.normal
} }
@ -795,10 +822,10 @@ RowLayout {
from: 0 from: 0
to: 100 to: 100
value: root.transparencyLayers * 100 value: rootPane.transparencyLayers * 100
onMoved: { onMoved: {
root.transparencyLayers = layersSlider.value / 100; rootPane.transparencyLayers = layersSlider.value / 100;
root.saveConfig(); rootPane.saveConfig();
} }
} }
} }
@ -809,7 +836,7 @@ RowLayout {
id: borderSection id: borderSection
title: qsTr("Border") title: qsTr("Border")
onToggleRequested: { onToggleRequested: {
root.collapseAllSections(borderSection); sidebarFlickable.collapseAllSections(borderSection);
} }
SpinBoxRow { SpinBoxRow {
@ -817,10 +844,10 @@ RowLayout {
min: 0.1 min: 0.1
max: 100 max: 100
step: 0.1 step: 0.1
value: root.borderRounding value: rootPane.borderRounding
onValueModified: value => { onValueModified: value => {
root.borderRounding = value; rootPane.borderRounding = value;
root.saveConfig(); rootPane.saveConfig();
} }
} }
@ -829,10 +856,10 @@ RowLayout {
min: 0.1 min: 0.1
max: 100 max: 100
step: 0.1 step: 0.1
value: root.borderThickness value: rootPane.borderThickness
onValueModified: value => { onValueModified: value => {
root.borderThickness = value; rootPane.borderThickness = value;
root.saveConfig(); rootPane.saveConfig();
} }
} }
} }
@ -841,24 +868,24 @@ RowLayout {
id: backgroundSection id: backgroundSection
title: qsTr("Background") title: qsTr("Background")
onToggleRequested: { onToggleRequested: {
root.collapseAllSections(backgroundSection); sidebarFlickable.collapseAllSections(backgroundSection);
} }
SwitchRow { SwitchRow {
label: qsTr("Desktop clock") label: qsTr("Desktop clock")
checked: root.desktopClockEnabled checked: rootPane.desktopClockEnabled
onToggled: checked => { onToggled: checked => {
root.desktopClockEnabled = checked; rootPane.desktopClockEnabled = checked;
root.saveConfig(); rootPane.saveConfig();
} }
} }
SwitchRow { SwitchRow {
label: qsTr("Background enabled") label: qsTr("Background enabled")
checked: root.backgroundEnabled checked: rootPane.backgroundEnabled
onToggled: checked => { onToggled: checked => {
root.backgroundEnabled = checked; rootPane.backgroundEnabled = checked;
root.saveConfig(); rootPane.saveConfig();
} }
} }
@ -871,19 +898,19 @@ RowLayout {
SwitchRow { SwitchRow {
label: qsTr("Visualiser enabled") label: qsTr("Visualiser enabled")
checked: root.visualiserEnabled checked: rootPane.visualiserEnabled
onToggled: checked => { onToggled: checked => {
root.visualiserEnabled = checked; rootPane.visualiserEnabled = checked;
root.saveConfig(); rootPane.saveConfig();
} }
} }
SwitchRow { SwitchRow {
label: qsTr("Visualiser auto hide") label: qsTr("Visualiser auto hide")
checked: root.visualiserAutoHide checked: rootPane.visualiserAutoHide
onToggled: checked => { onToggled: checked => {
root.visualiserAutoHide = checked; rootPane.visualiserAutoHide = checked;
root.saveConfig(); rootPane.saveConfig();
} }
} }
@ -891,10 +918,10 @@ RowLayout {
label: qsTr("Visualiser rounding") label: qsTr("Visualiser rounding")
min: 0 min: 0
max: 10 max: 10
value: Math.round(root.visualiserRounding) value: Math.round(rootPane.visualiserRounding)
onValueModified: value => { onValueModified: value => {
root.visualiserRounding = value; rootPane.visualiserRounding = value;
root.saveConfig(); rootPane.saveConfig();
} }
} }
@ -902,19 +929,15 @@ RowLayout {
label: qsTr("Visualiser spacing") label: qsTr("Visualiser spacing")
min: 0 min: 0
max: 10 max: 10
value: Math.round(root.visualiserSpacing) value: Math.round(rootPane.visualiserSpacing)
onValueModified: value => { onValueModified: value => {
root.visualiserSpacing = value; rootPane.visualiserSpacing = value;
root.saveConfig(); rootPane.saveConfig();
} }
} }
} }
} }
} }
InnerBorder {
leftThickness: 0
rightThickness: Appearance.padding.normal / 2
} }
} }
@ -922,17 +945,43 @@ RowLayout {
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
StyledFlickable { ClippingRectangle {
id: rightAppearanceClippingRect
anchors.fill: parent anchors.fill: parent
anchors.margins: Appearance.padding.normal anchors.margins: Appearance.padding.normal
anchors.leftMargin: 0 anchors.leftMargin: 0
anchors.rightMargin: Appearance.padding.normal / 2 anchors.rightMargin: Appearance.padding.normal / 2
radius: rightAppearanceBorder.innerRadius
color: "transparent"
Loader {
id: rightAppearanceLoader
anchors.fill: parent
anchors.topMargin: Appearance.padding.large * 2
anchors.bottomMargin: Appearance.padding.large * 2
anchors.leftMargin: 0
anchors.rightMargin: 0
asynchronous: true
sourceComponent: appearanceRightContentComponent
property var rootPane: root
}
}
InnerBorder {
id: rightAppearanceBorder
leftThickness: Appearance.padding.normal / 2
}
Component {
id: appearanceRightContentComponent
StyledFlickable {
id: rightAppearanceFlickable
flickableDirection: Flickable.VerticalFlick flickableDirection: Flickable.VerticalFlick
contentHeight: contentLayout.height contentHeight: contentLayout.height
StyledScrollBar.vertical: StyledScrollBar { StyledScrollBar.vertical: StyledScrollBar {
flickable: parent flickable: rightAppearanceFlickable
} }
ColumnLayout { ColumnLayout {
@ -940,11 +989,8 @@ RowLayout {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top
anchors.leftMargin: Appearance.padding.large * 2 anchors.leftMargin: Appearance.padding.large * 2
anchors.rightMargin: Appearance.padding.large * 2 anchors.rightMargin: Appearance.padding.large * 2
anchors.topMargin: Appearance.padding.large * 2
spacing: Appearance.spacing.normal spacing: Appearance.spacing.normal
MaterialIcon { MaterialIcon {
@ -1183,9 +1229,6 @@ RowLayout {
} }
} }
} }
InnerBorder {
leftThickness: Appearance.padding.normal / 2
} }
} }
} }

View file

@ -7,6 +7,7 @@ import qs.components.effects
import qs.components.containers import qs.components.containers
import qs.services import qs.services
import qs.config import qs.config
import Quickshell.Widgets
import QtQuick import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
@ -20,20 +21,50 @@ RowLayout {
spacing: 0 spacing: 0
Item { Item {
id: leftAudioItem
Layout.preferredWidth: Math.floor(parent.width * 0.4) Layout.preferredWidth: Math.floor(parent.width * 0.4)
Layout.minimumWidth: 420 Layout.minimumWidth: 420
Layout.fillHeight: true Layout.fillHeight: true
StyledFlickable { ClippingRectangle {
id: leftAudioClippingRect
anchors.fill: parent
anchors.margins: Appearance.padding.normal
anchors.leftMargin: 0
anchors.rightMargin: Appearance.padding.normal / 2
radius: leftAudioBorder.innerRadius
color: "transparent"
Loader {
id: leftAudioLoader
anchors.fill: parent anchors.fill: parent
anchors.margins: Appearance.padding.large + Appearance.padding.normal anchors.margins: Appearance.padding.large + Appearance.padding.normal
anchors.leftMargin: Appearance.padding.large anchors.leftMargin: Appearance.padding.large
anchors.rightMargin: Appearance.padding.large + Appearance.padding.normal / 2 anchors.rightMargin: Appearance.padding.large + Appearance.padding.normal / 2
asynchronous: true
sourceComponent: audioLeftContentComponent
}
}
InnerBorder {
id: leftAudioBorder
leftThickness: 0
rightThickness: Appearance.padding.normal / 2
}
Component {
id: audioLeftContentComponent
StyledFlickable {
id: leftAudioFlickable
flickableDirection: Flickable.VerticalFlick flickableDirection: Flickable.VerticalFlick
contentHeight: leftContent.height contentHeight: leftContent.height
StyledScrollBar.vertical: StyledScrollBar { StyledScrollBar.vertical: StyledScrollBar {
flickable: parent flickable: leftAudioFlickable
} }
ColumnLayout { ColumnLayout {
@ -216,28 +247,53 @@ RowLayout {
} }
} }
} }
InnerBorder {
leftThickness: 0
rightThickness: Appearance.padding.normal / 2
} }
} }
Item { Item {
id: rightAudioItem
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
StyledFlickable { ClippingRectangle {
id: rightAudioClippingRect
anchors.fill: parent anchors.fill: parent
anchors.margins: Appearance.padding.normal anchors.margins: Appearance.padding.normal
anchors.leftMargin: 0 anchors.leftMargin: 0
anchors.rightMargin: Appearance.padding.normal / 2 anchors.rightMargin: Appearance.padding.normal / 2
radius: rightAudioBorder.innerRadius
color: "transparent"
Loader {
id: rightAudioLoader
anchors.fill: parent
anchors.topMargin: Appearance.padding.large * 2
anchors.bottomMargin: Appearance.padding.large * 2
anchors.leftMargin: 0
anchors.rightMargin: 0
asynchronous: true
sourceComponent: audioRightContentComponent
}
}
InnerBorder {
id: rightAudioBorder
leftThickness: Appearance.padding.normal / 2
}
Component {
id: audioRightContentComponent
StyledFlickable {
id: rightAudioFlickable
flickableDirection: Flickable.VerticalFlick flickableDirection: Flickable.VerticalFlick
contentHeight: contentLayout.height contentHeight: contentLayout.height
StyledScrollBar.vertical: StyledScrollBar { StyledScrollBar.vertical: StyledScrollBar {
flickable: parent flickable: rightAudioFlickable
} }
ColumnLayout { ColumnLayout {
@ -245,11 +301,8 @@ RowLayout {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top
anchors.leftMargin: Appearance.padding.large * 2 anchors.leftMargin: Appearance.padding.large * 2
anchors.rightMargin: Appearance.padding.large * 2 anchors.rightMargin: Appearance.padding.large * 2
anchors.topMargin: Appearance.padding.large * 2
spacing: Appearance.spacing.normal spacing: Appearance.spacing.normal
ConnectionHeader { ConnectionHeader {
@ -398,9 +451,6 @@ RowLayout {
} }
} }
} }
InnerBorder {
leftThickness: Appearance.padding.normal / 2
} }
} }
} }

View file

@ -19,30 +19,57 @@ RowLayout {
spacing: 0 spacing: 0
Item { Item {
id: leftBtItem
Layout.preferredWidth: Math.floor(parent.width * 0.4) Layout.preferredWidth: Math.floor(parent.width * 0.4)
Layout.minimumWidth: 420 Layout.minimumWidth: 420
Layout.fillHeight: true Layout.fillHeight: true
DeviceList { ClippingRectangle {
id: leftBtClippingRect
anchors.fill: parent
anchors.margins: Appearance.padding.normal
anchors.leftMargin: 0
anchors.rightMargin: Appearance.padding.normal / 2
radius: leftBtBorder.innerRadius
color: "transparent"
Loader {
id: leftBtLoader
anchors.fill: parent anchors.fill: parent
anchors.margins: Appearance.padding.large + Appearance.padding.normal anchors.margins: Appearance.padding.large + Appearance.padding.normal
anchors.leftMargin: Appearance.padding.large anchors.leftMargin: Appearance.padding.large
anchors.rightMargin: Appearance.padding.large + Appearance.padding.normal / 2 anchors.rightMargin: Appearance.padding.large + Appearance.padding.normal / 2
session: root.session asynchronous: true
sourceComponent: btDeviceListComponent
}
} }
InnerBorder { InnerBorder {
id: leftBtBorder
leftThickness: 0 leftThickness: 0
rightThickness: Appearance.padding.normal / 2 rightThickness: Appearance.padding.normal / 2
} }
Component {
id: btDeviceListComponent
DeviceList {
anchors.fill: parent
session: root.session
}
}
} }
Item { Item {
id: rightBtItem
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
ClippingRectangle { ClippingRectangle {
id: btClippingRect
anchors.fill: parent anchors.fill: parent
anchors.margins: Appearance.padding.normal anchors.margins: Appearance.padding.normal
anchors.leftMargin: 0 anchors.leftMargin: 0

View file

@ -144,17 +144,47 @@ RowLayout {
} }
Item { Item {
id: leftLauncherItem
Layout.preferredWidth: Math.floor(parent.width * 0.4) Layout.preferredWidth: Math.floor(parent.width * 0.4)
Layout.minimumWidth: 420 Layout.minimumWidth: 420
Layout.fillHeight: true Layout.fillHeight: true
ColumnLayout { ClippingRectangle {
id: leftLauncherClippingRect
anchors.fill: parent
anchors.margins: Appearance.padding.normal
anchors.leftMargin: 0
anchors.rightMargin: Appearance.padding.normal / 2
radius: leftLauncherBorder.innerRadius
color: "transparent"
Loader {
id: leftLauncherLoader
anchors.fill: parent anchors.fill: parent
anchors.margins: Appearance.padding.large + Appearance.padding.normal anchors.margins: Appearance.padding.large + Appearance.padding.normal
anchors.leftMargin: Appearance.padding.large anchors.leftMargin: Appearance.padding.large
anchors.rightMargin: Appearance.padding.large + Appearance.padding.normal / 2 anchors.rightMargin: Appearance.padding.large + Appearance.padding.normal / 2
anchors.bottomMargin: 0 anchors.bottomMargin: 0
asynchronous: true
sourceComponent: leftContentComponent
}
}
InnerBorder {
id: leftLauncherBorder
leftThickness: 0
rightThickness: Appearance.padding.normal / 2
}
Component {
id: leftContentComponent
ColumnLayout {
anchors.fill: parent
spacing: Appearance.spacing.small spacing: Appearance.spacing.small
RowLayout { RowLayout {
@ -268,6 +298,7 @@ RowLayout {
} }
StyledListView { StyledListView {
id: appsListView
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
@ -323,23 +354,47 @@ RowLayout {
} }
} }
} }
InnerBorder {
leftThickness: 0
rightThickness: Appearance.padding.normal / 2
} }
} }
Item { Item {
id: rightLauncherItem
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
ColumnLayout { ClippingRectangle {
id: rightLauncherClippingRect
anchors.fill: parent anchors.fill: parent
anchors.margins: Appearance.padding.normal anchors.margins: Appearance.padding.normal
anchors.leftMargin: 0 anchors.leftMargin: 0
anchors.rightMargin: Appearance.padding.normal / 2 anchors.rightMargin: Appearance.padding.normal / 2
radius: rightLauncherBorder.innerRadius
color: "transparent"
Loader {
id: rightLauncherLoader
anchors.fill: parent
anchors.margins: Appearance.padding.large * 2
asynchronous: true
sourceComponent: rightContentComponent
}
}
InnerBorder {
id: rightLauncherBorder
leftThickness: Appearance.padding.normal / 2
}
Component {
id: rightContentComponent
ColumnLayout {
anchors.fill: parent
spacing: Appearance.spacing.normal spacing: Appearance.spacing.normal
Item { Item {
@ -397,6 +452,7 @@ RowLayout {
Layout.rightMargin: Appearance.padding.large * 2 Layout.rightMargin: Appearance.padding.large * 2
StyledFlickable { StyledFlickable {
id: detailsFlickable
anchors.fill: parent anchors.fill: parent
flickableDirection: Flickable.VerticalFlick flickableDirection: Flickable.VerticalFlick
contentHeight: debugLayout.height contentHeight: debugLayout.height
@ -428,9 +484,6 @@ RowLayout {
} }
} }
} }
InnerBorder {
leftThickness: Appearance.padding.normal / 2
} }
} }
} }

View file

@ -29,15 +29,46 @@ Item {
spacing: 0 spacing: 0
Item { Item {
id: leftNetworkItem
Layout.preferredWidth: Math.floor(parent.width * 0.4) Layout.preferredWidth: Math.floor(parent.width * 0.4)
Layout.minimumWidth: 420 Layout.minimumWidth: 420
Layout.fillHeight: true Layout.fillHeight: true
// Left pane - networking list with collapsible sections ClippingRectangle {
id: leftNetworkClippingRect
anchors.fill: parent
anchors.margins: Appearance.padding.normal
anchors.leftMargin: 0
anchors.rightMargin: Appearance.padding.normal / 2
radius: leftNetworkBorder.innerRadius
color: "transparent"
Loader {
id: leftNetworkLoader
anchors.fill: parent
anchors.margins: Appearance.padding.large + Appearance.padding.normal
anchors.leftMargin: Appearance.padding.large
anchors.rightMargin: Appearance.padding.large + Appearance.padding.normal / 2
asynchronous: true
sourceComponent: networkListComponent
}
}
InnerBorder {
id: leftNetworkBorder
leftThickness: 0
rightThickness: Appearance.padding.normal / 2
}
Component {
id: networkListComponent
StyledFlickable { StyledFlickable {
id: leftFlickable id: leftFlickable
anchors.fill: parent
flickableDirection: Flickable.VerticalFlick flickableDirection: Flickable.VerticalFlick
contentHeight: leftContent.height contentHeight: leftContent.height
@ -50,10 +81,6 @@ Item {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top
anchors.margins: Appearance.padding.large + Appearance.padding.normal
anchors.leftMargin: Appearance.padding.large
anchors.rightMargin: Appearance.padding.large + Appearance.padding.normal / 2
spacing: Appearance.spacing.normal spacing: Appearance.spacing.normal
// Settings header above the collapsible sections // Settings header above the collapsible sections
@ -385,18 +412,16 @@ Item {
} }
} }
} }
InnerBorder {
leftThickness: 0
rightThickness: Appearance.padding.normal / 2
} }
} }
Item { Item {
id: rightNetworkItem
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
ClippingRectangle { ClippingRectangle {
id: networkClippingRect
anchors.fill: parent anchors.fill: parent
anchors.margins: Appearance.padding.normal anchors.margins: Appearance.padding.normal
anchors.leftMargin: 0 anchors.leftMargin: 0

View file

@ -9,6 +9,7 @@ import qs.services
import qs.config import qs.config
import qs.utils import qs.utils
import Quickshell import Quickshell
import Quickshell.Widgets
import QtQuick import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
@ -17,6 +18,9 @@ RowLayout {
required property Session session required property Session session
// Clock
property bool clockShowIcon: Config.bar.clock.showIcon ?? true
// Bar Behavior // Bar Behavior
property bool persistent: Config.bar.persistent ?? true property bool persistent: Config.bar.persistent ?? true
property bool showOnHover: Config.bar.showOnHover ?? true property bool showOnHover: Config.bar.showOnHover ?? true
@ -48,9 +52,6 @@ RowLayout {
spacing: 0 spacing: 0
Component.onCompleted: { Component.onCompleted: {
// Update clock toggle
clockShowIconSwitch.checked = Config.bar.clock.showIcon ?? true;
// Update entries // Update entries
if (Config.bar.entries) { if (Config.bar.entries) {
entriesModel.clear(); entriesModel.clear();
@ -66,7 +67,7 @@ RowLayout {
function saveConfig(entryIndex, entryEnabled) { function saveConfig(entryIndex, entryEnabled) {
// Update clock setting // Update clock setting
Config.bar.clock.showIcon = clockShowIconSwitch.checked; Config.bar.clock.showIcon = root.clockShowIcon;
// Update bar behavior // Update bar behavior
Config.bar.persistent = root.persistent; Config.bar.persistent = root.persistent;
@ -116,23 +117,46 @@ RowLayout {
id: entriesModel id: entriesModel
} }
function collapseAllSections(exceptSection) {
if (exceptSection !== clockSection) clockSection.expanded = false;
if (exceptSection !== barBehaviorSection) barBehaviorSection.expanded = false;
if (exceptSection !== statusIconsSection) statusIconsSection.expanded = false;
if (exceptSection !== traySettingsSection) traySettingsSection.expanded = false;
if (exceptSection !== workspacesSection) workspacesSection.expanded = false;
}
Item { Item {
id: leftTaskbarItem
Layout.preferredWidth: Math.floor(parent.width * 0.4) Layout.preferredWidth: Math.floor(parent.width * 0.4)
Layout.minimumWidth: 420 Layout.minimumWidth: 420
Layout.fillHeight: true Layout.fillHeight: true
ClippingRectangle {
id: leftTaskbarClippingRect
anchors.fill: parent
anchors.margins: Appearance.padding.normal
anchors.leftMargin: 0
anchors.rightMargin: Appearance.padding.normal / 2
radius: leftTaskbarBorder.innerRadius
color: "transparent"
Loader {
id: leftTaskbarLoader
anchors.fill: parent
anchors.margins: Appearance.padding.large + Appearance.padding.normal
anchors.leftMargin: Appearance.padding.large
anchors.rightMargin: Appearance.padding.large + Appearance.padding.normal / 2
asynchronous: true
sourceComponent: leftTaskbarContentComponent
}
}
InnerBorder {
id: leftTaskbarBorder
leftThickness: 0
rightThickness: Appearance.padding.normal / 2
}
Component {
id: leftTaskbarContentComponent
StyledFlickable { StyledFlickable {
id: sidebarFlickable id: sidebarFlickable
anchors.fill: parent
flickableDirection: Flickable.VerticalFlick flickableDirection: Flickable.VerticalFlick
contentHeight: sidebarLayout.height contentHeight: sidebarLayout.height
@ -145,9 +169,6 @@ RowLayout {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top anchors.top: parent.top
anchors.margins: Appearance.padding.large + Appearance.padding.normal
anchors.leftMargin: Appearance.padding.large
anchors.rightMargin: Appearance.padding.large + Appearance.padding.normal / 2
spacing: Appearance.spacing.small spacing: Appearance.spacing.small
@ -169,9 +190,6 @@ RowLayout {
id: clockSection id: clockSection
title: qsTr("Clock") title: qsTr("Clock")
description: qsTr("Clock display settings") description: qsTr("Clock display settings")
onToggleRequested: {
root.collapseAllSections(clockSection);
}
RowLayout { RowLayout {
id: clockRow id: clockRow
@ -190,8 +208,9 @@ RowLayout {
StyledSwitch { StyledSwitch {
id: clockShowIconSwitch id: clockShowIconSwitch
checked: true checked: root.clockShowIcon
onToggled: { onToggled: {
root.clockShowIcon = checked;
root.saveConfig(); root.saveConfig();
} }
} }
@ -201,9 +220,6 @@ RowLayout {
CollapsibleSection { CollapsibleSection {
id: barBehaviorSection id: barBehaviorSection
title: qsTr("Bar Behavior") title: qsTr("Bar Behavior")
onToggleRequested: {
root.collapseAllSections(barBehaviorSection);
}
SwitchRow { SwitchRow {
label: qsTr("Persistent") label: qsTr("Persistent")
@ -238,9 +254,6 @@ RowLayout {
CollapsibleSection { CollapsibleSection {
id: statusIconsSection id: statusIconsSection
title: qsTr("Status Icons") title: qsTr("Status Icons")
onToggleRequested: {
root.collapseAllSections(statusIconsSection);
}
SwitchRow { SwitchRow {
label: qsTr("Show audio") label: qsTr("Show audio")
@ -309,9 +322,6 @@ RowLayout {
CollapsibleSection { CollapsibleSection {
id: traySettingsSection id: traySettingsSection
title: qsTr("Tray Settings") title: qsTr("Tray Settings")
onToggleRequested: {
root.collapseAllSections(traySettingsSection);
}
SwitchRow { SwitchRow {
label: qsTr("Background") label: qsTr("Background")
@ -344,9 +354,6 @@ RowLayout {
CollapsibleSection { CollapsibleSection {
id: workspacesSection id: workspacesSection
title: qsTr("Workspaces") title: qsTr("Workspaces")
onToggleRequested: {
root.collapseAllSections(workspacesSection);
}
StyledRect { StyledRect {
Layout.fillWidth: true Layout.fillWidth: true
@ -517,23 +524,45 @@ RowLayout {
} }
} }
} }
InnerBorder {
leftThickness: 0
rightThickness: Appearance.padding.normal / 2
} }
} }
Item { Item {
id: rightTaskbarItem
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
StyledFlickable { ClippingRectangle {
id: rightTaskbarClippingRect
anchors.fill: parent anchors.fill: parent
anchors.margins: Appearance.padding.normal anchors.margins: Appearance.padding.normal
anchors.leftMargin: 0 anchors.leftMargin: 0
anchors.rightMargin: Appearance.padding.normal / 2 anchors.rightMargin: Appearance.padding.normal / 2
radius: rightTaskbarBorder.innerRadius
color: "transparent"
Loader {
id: rightTaskbarLoader
anchors.fill: parent
anchors.margins: Appearance.padding.large * 2
asynchronous: true
sourceComponent: rightTaskbarContentComponent
}
}
InnerBorder {
id: rightTaskbarBorder
leftThickness: Appearance.padding.normal / 2
}
Component {
id: rightTaskbarContentComponent
StyledFlickable {
flickableDirection: Flickable.VerticalFlick flickableDirection: Flickable.VerticalFlick
contentHeight: contentLayout.height contentHeight: contentLayout.height
@ -547,9 +576,6 @@ RowLayout {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top anchors.top: parent.top
anchors.leftMargin: Appearance.padding.large * 2
anchors.rightMargin: Appearance.padding.large * 2
anchors.topMargin: Appearance.padding.large * 2
spacing: Appearance.spacing.normal spacing: Appearance.spacing.normal
@ -577,7 +603,7 @@ RowLayout {
StyledText { StyledText {
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
text: clockShowIconSwitch.checked ? qsTr("Clock icon enabled") : qsTr("Clock icon disabled") text: root.clockShowIcon ? qsTr("Clock icon enabled") : qsTr("Clock icon disabled")
color: Colours.palette.m3outline color: Colours.palette.m3outline
} }
@ -597,9 +623,6 @@ RowLayout {
} }
} }
InnerBorder {
leftThickness: Appearance.padding.normal / 2
} }
} }
} }