1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

windows: add minimum sizes

This commit is contained in:
bbedward
2025-11-25 13:58:08 -05:00
parent 80f6eb94aa
commit 004a014000
6 changed files with 139 additions and 168 deletions

View File

@@ -3,10 +3,8 @@ import QtCore
import QtQuick import QtQuick
import QtQuick.Controls import QtQuick.Controls
import Quickshell import Quickshell
import Quickshell.Io
import qs.Common import qs.Common
import qs.Modals.FileBrowser import qs.Modals.FileBrowser
import qs.Services
import qs.Widgets import qs.Widgets
FloatingWindow { FloatingWindow {
@@ -215,6 +213,7 @@ FloatingWindow {
objectName: "fileBrowserModal" objectName: "fileBrowserModal"
title: "Files - " + browserTitle title: "Files - " + browserTitle
minimumSize: Qt.size(500, 400)
implicitWidth: 800 implicitWidth: 800
implicitHeight: 600 implicitHeight: 600
color: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency) color: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency)

View File

@@ -42,6 +42,7 @@ FloatingWindow {
objectName: "processListModal" objectName: "processListModal"
title: I18n.tr("System Monitor", "sysmon window title") title: I18n.tr("System Monitor", "sysmon window title")
minimumSize: Qt.size(650, 400)
implicitWidth: 900 implicitWidth: 900
implicitHeight: 680 implicitHeight: 680
color: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency) color: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency)

View File

@@ -39,6 +39,7 @@ FloatingWindow {
objectName: "settingsModal" objectName: "settingsModal"
title: I18n.tr("Settings", "settings window title") title: I18n.tr("Settings", "settings window title")
minimumSize: Qt.size(500, 400)
implicitWidth: 800 implicitWidth: 800
implicitHeight: 800 implicitHeight: 800
color: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency) color: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency)

View File

@@ -1,5 +1,4 @@
import QtQuick import QtQuick
import QtQuick.Controls
import qs.Common import qs.Common
import qs.Services import qs.Services
import qs.Widgets import qs.Widgets
@@ -76,7 +75,6 @@ Column {
color: Theme.primary color: Theme.primary
anchors.centerIn: parent anchors.centerIn: parent
} }
} }
Item { Item {
@@ -90,7 +88,6 @@ Column {
color: Theme.surfaceVariantText color: Theme.surfaceVariantText
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
} }
DankFlickable { DankFlickable {
@@ -147,11 +144,8 @@ Column {
NumberAnimation { NumberAnimation {
duration: Theme.shortDuration duration: Theme.shortDuration
} }
} }
} }
} }
StyledText { StyledText {
@@ -163,21 +157,20 @@ Column {
horizontalAlignment: Text.AlignRight horizontalAlignment: Text.AlignRight
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
}
}
}
}
}
} }
} Row {
width: parent.width
} height: 80
spacing: Theme.spacingM
}
}
}
Rectangle { Rectangle {
width: parent.width width: (parent.width - Theme.spacingM) / 2
height: 80 height: 80
radius: Theme.cornerRadius radius: Theme.cornerRadius
color: Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency) color: Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency)
@@ -186,7 +179,6 @@ Column {
Row { Row {
anchors.centerIn: parent anchors.centerIn: parent
anchors.margins: Theme.spacingM
spacing: Theme.spacingM spacing: Theme.spacingM
Column { Column {
@@ -205,18 +197,12 @@ Column {
font.pixelSize: Theme.fontSizeSmall font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText color: Theme.surfaceVariantText
} }
}
Item {
width: Theme.spacingL
height: 1
} }
Column { Column {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
spacing: 4 spacing: 4
width: 200 width: 120
Rectangle { Rectangle {
width: parent.width width: parent.width
@@ -243,11 +229,8 @@ Column {
NumberAnimation { NumberAnimation {
duration: Theme.mediumDuration duration: Theme.mediumDuration
} }
} }
} }
} }
StyledText { StyledText {
@@ -256,13 +239,21 @@ Column {
font.weight: Font.Bold font.weight: Font.Bold
color: Theme.surfaceText color: Theme.surfaceText
} }
}
}
} }
Item { Rectangle {
width: Theme.spacingL width: (parent.width - Theme.spacingM) / 2
height: 1 height: 80
} radius: Theme.cornerRadius
color: Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency)
border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.06)
border.width: 1
Row {
anchors.centerIn: parent
spacing: Theme.spacingM
Column { Column {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
@@ -276,22 +267,16 @@ Column {
} }
StyledText { StyledText {
text: DgopService.totalSwapKB > 0 ? `${DgopService.formatSystemMemory(DgopService.usedSwapKB)} / ${DgopService.formatSystemMemory(DgopService.totalSwapKB)}` : "No swap configured" text: DgopService.totalSwapKB > 0 ? `${DgopService.formatSystemMemory(DgopService.usedSwapKB)} / ${DgopService.formatSystemMemory(DgopService.totalSwapKB)}` : "No swap"
font.pixelSize: Theme.fontSizeSmall font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText color: Theme.surfaceVariantText
} }
}
Item {
width: Theme.spacingL
height: 1
} }
Column { Column {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
spacing: 4 spacing: 4
width: 200 width: 120
Rectangle { Rectangle {
width: parent.width width: parent.width
@@ -321,24 +306,19 @@ Column {
NumberAnimation { NumberAnimation {
duration: Theme.mediumDuration duration: Theme.mediumDuration
} }
} }
} }
} }
StyledText { StyledText {
text: DgopService.totalSwapKB > 0 ? `${((DgopService.usedSwapKB / DgopService.totalSwapKB) * 100).toFixed(1)}% used` : "Not available" text: DgopService.totalSwapKB > 0 ? `${((DgopService.usedSwapKB / DgopService.totalSwapKB) * 100).toFixed(1)}% used` : "N/A"
font.pixelSize: Theme.fontSizeSmall font.pixelSize: Theme.fontSizeSmall
font.weight: Font.Bold font.weight: Font.Bold
color: Theme.surfaceText color: Theme.surfaceText
} }
} }
} }
}
} }
Row { Row {
@@ -385,7 +365,6 @@ Column {
font.weight: Font.Bold font.weight: Font.Bold
color: Theme.surfaceText color: Theme.surfaceText
} }
} }
Row { Row {
@@ -403,13 +382,9 @@ Column {
font.weight: Font.Bold font.weight: Font.Bold
color: Theme.surfaceText color: Theme.surfaceText
} }
} }
} }
} }
} }
Rectangle { Rectangle {
@@ -451,7 +426,6 @@ Column {
font.weight: Font.Bold font.weight: Font.Bold
color: Theme.surfaceText color: Theme.surfaceText
} }
} }
Row { Row {
@@ -469,15 +443,9 @@ Column {
font.weight: Font.Bold font.weight: Font.Bold
color: Theme.surfaceText color: Theme.surfaceText
} }
} }
} }
} }
} }
} }
} }

View File

@@ -103,6 +103,7 @@ FloatingWindow {
objectName: "pluginBrowser" objectName: "pluginBrowser"
title: I18n.tr("Browse Plugins") title: I18n.tr("Browse Plugins")
minimumSize: Qt.size(450, 400)
implicitWidth: 600 implicitWidth: 600
implicitHeight: 650 implicitHeight: 650
color: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency) color: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency)

View File

@@ -90,6 +90,7 @@ FloatingWindow {
objectName: "widgetSelectionPopup" objectName: "widgetSelectionPopup"
title: I18n.tr("Add Widget") title: I18n.tr("Add Widget")
minimumSize: Qt.size(400, 350)
implicitWidth: 500 implicitWidth: 500
implicitHeight: 550 implicitHeight: 550
color: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency) color: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency)