added adaptive quickshell
This commit is contained in:
1 parent
6eb56d2065
commit
5b33a73fd8
189 files changed
+8678
-15
No files matched your search
@@ -0,0 +1,69 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
import QtQuick
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import "services"
|
||||
import "components"
|
||||
|
||||
ScrollView {
|
||||
id: settings
|
||||
signal navigate(string name)
|
||||
Material.theme: Theme.dark ? Material.Dark : Material.Light
|
||||
Material.accent: Theme.primary
|
||||
clip: true
|
||||
contentWidth: availableWidth
|
||||
ColumnLayout {
|
||||
width: settings.availableWidth
|
||||
spacing: 16
|
||||
Label { text: "Оболочка и внешний вид"; font.pixelSize: 22; color: Theme.primary }
|
||||
Label { text: Preferences.error; visible: text !== ""; wrapMode: Text.Wrap; Layout.fillWidth: true; color: Theme.foreground }
|
||||
Label { text: "Общий режим"; color: Theme.foreground }
|
||||
ComboBox {
|
||||
model: ["auto", "desktop", "tablet", "phone"]
|
||||
currentIndex: model.indexOf(Preferences.data.mode)
|
||||
enabled: Preferences.writable
|
||||
onActivated: Preferences.setValue("mode", currentText)
|
||||
}
|
||||
Switch {
|
||||
text: "Сенсорный ввод"
|
||||
checked: Preferences.data.touch
|
||||
enabled: Preferences.writable
|
||||
onClicked: Preferences.setValue("touch", checked)
|
||||
}
|
||||
Label { text: "Сенсорный ввод пока задаётся вручную; разрешение экрана не определяет тип устройства."; color: Theme.outline; wrapMode: Text.Wrap; Layout.fillWidth: true }
|
||||
Repeater {
|
||||
model: Quickshell.screens
|
||||
RowLayout {
|
||||
required property var modelData
|
||||
Label { text: modelData.name; color: Theme.foreground }
|
||||
ComboBox {
|
||||
model: ["auto", "desktop", "tablet", "phone"]
|
||||
currentIndex: model.indexOf(Preferences.data.outputs[modelData.name] || "auto")
|
||||
enabled: Preferences.writable
|
||||
onActivated: Preferences.setOutput(modelData.name, currentText)
|
||||
}
|
||||
}
|
||||
}
|
||||
Label { text: "Цветовая схема"; color: Theme.foreground }
|
||||
ComboBox {
|
||||
model: ["dark", "light", "amoled"]
|
||||
currentIndex: model.indexOf(Preferences.data.theme)
|
||||
enabled: Preferences.writable
|
||||
onActivated: Preferences.setValue("theme", currentText)
|
||||
}
|
||||
Switch { text: "Уменьшить движение"; checked: Preferences.data.reducedMotion; enabled: Preferences.writable; onClicked: Preferences.setValue("reducedMotion", checked) }
|
||||
Label { text: "Безопасность"; font.pixelSize: 22; color: Theme.primary }
|
||||
Label { text: "Блокировка: Hyprlock. Управление бездействием: Hypridle."; color: Theme.foreground; wrapMode: Text.Wrap; Layout.fillWidth: true }
|
||||
ActionButton { text: "Блокировка и питание…"; onClicked: settings.navigate("power") }
|
||||
Label { text: "Hardware Capabilities"; font.pixelSize: 22; color: Theme.primary }
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
text: "Wi-Fi: " + Hardware.wifiState + "\nСетевые интерфейсы: " + Hardware.networks.length + "\nBluetooth-контроллеры: " + Hardware.bluetoothAdapters.length + "\nPipeWire: " + (Hardware.audioReady ? "available" : "unavailable") + "\nАудиовыход: " + (Hardware.sink ? "available" : "unavailable") + "\nМикрофон: " + (Hardware.source ? "available" : "unavailable") + "\nАккумуляторы: " + Hardware.batteries.length
|
||||
color: Theme.foreground
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
Label { Layout.fillWidth: true; text: "Другие возможности оборудования ещё не проверяются. Отсутствие backend не означает отсутствие устройства."; color: Theme.outline; wrapMode: Text.Wrap }
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user