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,38 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Layouts
|
||||
import "services"
|
||||
|
||||
ScrollView {
|
||||
id: root
|
||||
contentWidth: availableWidth
|
||||
clip: true
|
||||
ColumnLayout {
|
||||
width: root.availableWidth
|
||||
spacing: 12
|
||||
Label { text: "О системе"; font.pixelSize: 24; font.bold: true; color: Theme.primary }
|
||||
Label { text: "Сведения обновляются автоматически. Изменение параметров системы здесь не выполняется."; wrapMode: Text.Wrap; Layout.fillWidth: true; color: Theme.outline }
|
||||
Label { visible: SystemInfo.error.length > 0; text: SystemInfo.error; wrapMode: Text.Wrap; Layout.fillWidth: true }
|
||||
Repeater {
|
||||
model: [
|
||||
{label: "Операционная система", value: SystemInfo.details.os || "—"},
|
||||
{label: "Ядро Linux", value: SystemInfo.details.kernel || "—"},
|
||||
{label: "Архитектура", value: SystemInfo.details.architecture || "—"},
|
||||
{label: "Имя устройства", value: SystemInfo.details.hostname || "—"},
|
||||
{label: "Оперативная память", value: SystemInfo.details.memoryTotalMiB ? (Math.round(SystemInfo.details.memoryTotalMiB / 102.4) / 10) + " ГиБ" : "—"},
|
||||
{label: "Доступная память", value: SystemInfo.details.memoryAvailableMiB ? (Math.round(SystemInfo.details.memoryAvailableMiB / 102.4) / 10) + " ГиБ" : "—"},
|
||||
{label: "Время работы", value: SystemInfo.details.uptimeSeconds !== undefined ? Math.floor(SystemInfo.details.uptimeSeconds / 3600) + " ч " + Math.floor(SystemInfo.details.uptimeSeconds % 3600 / 60) + " мин" : "—"}
|
||||
]
|
||||
ColumnLayout {
|
||||
required property var modelData
|
||||
Layout.fillWidth: true
|
||||
spacing: 2
|
||||
Label { text: modelData.label; font.pixelSize: 12; color: Theme.outline }
|
||||
Label { text: modelData.value; font.pixelSize: 16; color: Theme.foreground; wrapMode: Text.Wrap; Layout.fillWidth: true }
|
||||
}
|
||||
}
|
||||
Button { text: "Обновить"; enabled: !SystemInfo.busy; onClicked: SystemInfo.refresh() }
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user