mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-14 15:24:00 -04:00
60 lines
1.5 KiB
QML
60 lines
1.5 KiB
QML
import QtQuick
|
|
import qs.Common
|
|
import qs.Modules.Settings.Widgets
|
|
import qs.Modules.SystemUpdate
|
|
import qs.Services
|
|
import qs.DCommon.Widgets
|
|
import qs.Widgets
|
|
|
|
DFloatingWindow {
|
|
id: root
|
|
|
|
function show() {
|
|
visible = true;
|
|
}
|
|
|
|
function hide() {
|
|
visible = false;
|
|
}
|
|
|
|
objectName: "systemUpdateModal"
|
|
title: I18n.tr("Software updates", "settings page, modal and bar widget title, DMS and system package updates")
|
|
minimumSize: Qt.size(SettingsMetrics.windowMinWidth, SettingsMetrics.windowMinHeight)
|
|
implicitWidth: SettingsMetrics.formDialogWidth + SettingsMetrics.pagePaddingH * 2
|
|
readonly property real defaultHeight: SettingsMetrics.windowHeight - SettingsMetrics.pagePaddingV * 4
|
|
implicitHeight: screen ? Math.min(defaultHeight, screen.height - SettingsMetrics.pagePaddingH * 2 - Theme.spacingL) : defaultHeight
|
|
visible: false
|
|
|
|
Ref {
|
|
service: SystemUpdateService
|
|
active: root.visible
|
|
}
|
|
|
|
onClosed: hide()
|
|
|
|
Column {
|
|
anchors.fill: parent
|
|
spacing: 0
|
|
|
|
DWindowHeader {
|
|
id: titleBar
|
|
width: parent.width
|
|
controls: windowControls
|
|
title: root.title
|
|
onCloseRequested: root.hide()
|
|
}
|
|
|
|
SystemUpdatePanel {
|
|
width: parent.width
|
|
height: parent.height - titleBar.height
|
|
hostVisible: root.visible
|
|
onCloseRequested: root.hide()
|
|
}
|
|
}
|
|
|
|
FloatingWindowControls {
|
|
id: windowControls
|
|
targetWindow: root
|
|
}
|
|
}
|