fix wallswitcher and add button to open settings in bar
This commit is contained in:
parent
cad8cf7908
commit
49119bf0de
@ -60,6 +60,7 @@ Variants {
|
||||
Volume {}
|
||||
Battery {}
|
||||
SysTray {}
|
||||
SettingsIcon {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
29
modules/bar/SettingsIcon.qml
Normal file
29
modules/bar/SettingsIcon.qml
Normal 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
|
||||
}
|
||||
}
|
||||
@ -10,6 +10,10 @@ import qs.reusables
|
||||
|
||||
FloatingWindow {
|
||||
id: root
|
||||
visible: Settings.config.settingsShown
|
||||
onClosed: {
|
||||
Settings.config.settingsShown = false;
|
||||
}
|
||||
color: Colors.surface
|
||||
title: "qs-settings"
|
||||
implicitWidth: 800
|
||||
|
||||
@ -65,6 +65,7 @@ FloatingWindow {
|
||||
color: Colors.surfaceContainerLow
|
||||
GridView {
|
||||
id: gridRoot
|
||||
anchors.margins: 20
|
||||
property var columns: Math.floor(gridRoot.width / cellWidth)
|
||||
property var usedWidth: columns * cellWidth
|
||||
property var emptySpace: width - usedWidth
|
||||
@ -79,7 +80,6 @@ FloatingWindow {
|
||||
anchors.fill: innerWindow
|
||||
anchors.centerIn: innerWindow
|
||||
leftMargin: emptySpace / 2
|
||||
topMargin: 20
|
||||
model: folderModel
|
||||
delegate: fileDelegate
|
||||
FolderListModel {
|
||||
|
||||
@ -34,6 +34,7 @@ Singleton {
|
||||
property int screenCornerRadius: 10
|
||||
property double translucency: 1
|
||||
property bool blackScreenCorners: true
|
||||
property bool settingsShown: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user