fix wallswitcher and add button to open settings in bar

This commit is contained in:
lucy 2026-01-27 10:49:01 +01:00
parent cad8cf7908
commit 49119bf0de
6 changed files with 37 additions and 1 deletions

View File

@ -60,6 +60,7 @@ Variants {
Volume {} Volume {}
Battery {} Battery {}
SysTray {} SysTray {}
SettingsIcon {}
} }
} }
} }

View File

@ -0,0 +1,29 @@
import QtQuick
import qs.modules.widgets.settingsapp
import qs.settings
import qs.reusables
import qs
Rectangle {
id: root
radius: implicitHeight / 2
color: pavuArea.containsMouse ? Colors.primaryContainer : Colors.surfaceContainer
anchors.verticalCenter: parent.verticalCenter
implicitWidth: volumeIcon.implicitWidth + 5
implicitHeight: Settings.config.barHeight - 10
CustomIcon {
id: volumeIcon
anchors.centerIn: parent
text: "settings"
}
MouseArea {
id: pavuArea
anchors.fill: root
onClicked: {
Settings.config.settingsShown = true;
}
acceptedButtons: Qt.LeftButton
cursorShape: Qt.PointingHandCursor
hoverEnabled: true
}
}

View File

@ -10,6 +10,10 @@ import qs.reusables
FloatingWindow { FloatingWindow {
id: root id: root
visible: Settings.config.settingsShown
onClosed: {
Settings.config.settingsShown = false;
}
color: Colors.surface color: Colors.surface
title: "qs-settings" title: "qs-settings"
implicitWidth: 800 implicitWidth: 800

View File

@ -65,6 +65,7 @@ FloatingWindow {
color: Colors.surfaceContainerLow color: Colors.surfaceContainerLow
GridView { GridView {
id: gridRoot id: gridRoot
anchors.margins: 20
property var columns: Math.floor(gridRoot.width / cellWidth) property var columns: Math.floor(gridRoot.width / cellWidth)
property var usedWidth: columns * cellWidth property var usedWidth: columns * cellWidth
property var emptySpace: width - usedWidth property var emptySpace: width - usedWidth
@ -79,7 +80,6 @@ FloatingWindow {
anchors.fill: innerWindow anchors.fill: innerWindow
anchors.centerIn: innerWindow anchors.centerIn: innerWindow
leftMargin: emptySpace / 2 leftMargin: emptySpace / 2
topMargin: 20
model: folderModel model: folderModel
delegate: fileDelegate delegate: fileDelegate
FolderListModel { FolderListModel {

View File

@ -34,6 +34,7 @@ Singleton {
property int screenCornerRadius: 10 property int screenCornerRadius: 10
property double translucency: 1 property double translucency: 1
property bool blackScreenCorners: true property bool blackScreenCorners: true
property bool settingsShown: true
} }
} }
} }

View File

@ -15,4 +15,5 @@ ShellRoot {
Notification {} Notification {}
WallSwitcher {} WallSwitcher {}
Ipc {} Ipc {}
MainWindow {}
} }