99 lines
2.8 KiB
QML
Raw Normal View History

2026-01-26 14:28:35 +01:00
import QtQuick
import qs
import qs.reusables
import QtQuick.Layouts
import qs.settings
import Quickshell.Widgets
import QtQuick.Controls
import QtQuick.Dialogs
ClippingWrapperRectangle {
id: root
FontDialog {
id: fontPicker
title: "qs-fontpicker"
flags: FontDialog.NoButtons | FontDialog.MonospacedFonts
onAccepted: {
Settings.config.font = selectedFont.family;
Settings.config.fontSize = selectedFont.pointSize;
}
onSelectedFontChanged: {
Settings.config.font = selectedFont.family;
Settings.config.fontSize = selectedFont.pointSize;
}
}
anchors.centerIn: parent
clip: true
color: Colors.surfaceContainerLow
radius: 12
margin: 20
ColumnLayout {
id: verticalLayout
2026-01-27 23:47:09 +01:00
anchors.margins: 20
anchors.fill: parent
ClippingWrapperRectangle {
2026-01-26 14:28:35 +01:00
id: fontWrapper
2026-01-27 23:47:09 +01:00
leftMargin: 10
rightMargin: 10
implicitWidth: 300
topLeftRadius: 12
topRightRadius: 12
bottomRightRadius: 4
bottomLeftRadius: 4
2026-01-26 14:28:35 +01:00
color: Colors.surfaceContainerHigh
implicitHeight: 30
2026-01-27 23:47:09 +01:00
child: RowLayout {
2026-01-26 14:28:35 +01:00
id: fontLayout
2026-01-27 23:47:09 +01:00
spacing: 40
2026-01-26 14:28:35 +01:00
CustomText {
id: fontText
text: "current font: " + Settings.config.font
2026-01-27 23:47:09 +01:00
Layout.fillWidth: true
}
CustomButton {
id: fontPickerButton
customText: "pick font"
implicitHeight: fontWrapper.implicitHeight - 10
onClicked: fontPicker.open()
2026-01-26 14:28:35 +01:00
}
}
}
2026-01-27 23:47:09 +01:00
ClippingWrapperRectangle {
id: floatingWrapper
2026-01-27 23:47:09 +01:00
leftMargin: 10
rightMargin: 10
implicitHeight: 30
implicitWidth: 300
2026-01-27 23:47:09 +01:00
bottomLeftRadius: 12
bottomRightRadius: 12
topRightRadius: 4
topLeftRadius: 4
color: Colors.surfaceContainerHigh
child: RowLayout {
id: floatingToggleLayout
2026-01-27 23:47:09 +01:00
spacing: 40
CustomText {
id: floatingToggleText
text: "top bar floating"
2026-01-27 23:47:09 +01:00
Layout.fillWidth: true
}
CustomSwitch {
2026-01-27 23:47:09 +01:00
implicitHeight: floatingWrapper.implicitHeight - 10
implicitWidth: 34
onToggled: {
Settings.config.floating = !Settings.config.floating;
2026-01-26 14:28:35 +01:00
}
2026-01-27 23:47:09 +01:00
Layout.rightMargin: 5
2026-01-26 14:28:35 +01:00
}
}
}
Item {
id: spring
Layout.fillHeight: true
}
}
}