1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 13:32:50 -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.Controls
import Quickshell
import Quickshell.Io
import qs.Common
import qs.Modals.FileBrowser
import qs.Services
import qs.Widgets
FloatingWindow {
@@ -215,6 +213,7 @@ FloatingWindow {
objectName: "fileBrowserModal"
title: "Files - " + browserTitle
minimumSize: Qt.size(500, 400)
implicitWidth: 800
implicitHeight: 600
color: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency)

View File

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

View File

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

View File

@@ -1,5 +1,4 @@
import QtQuick
import QtQuick.Controls
import qs.Common
import qs.Services
import qs.Widgets
@@ -76,7 +75,6 @@ Column {
color: Theme.primary
anchors.centerIn: parent
}
}
Item {
@@ -90,7 +88,6 @@ Column {
color: Theme.surfaceVariantText
anchors.verticalCenter: parent.verticalCenter
}
}
DankFlickable {
@@ -147,11 +144,8 @@ Column {
NumberAnimation {
duration: Theme.shortDuration
}
}
}
}
StyledText {
@@ -163,21 +157,20 @@ Column {
horizontalAlignment: Text.AlignRight
anchors.verticalCenter: parent.verticalCenter
}
}
}
}
}
}
}
}
}
}
}
}
Row {
width: parent.width
height: 80
spacing: Theme.spacingM
Rectangle {
width: parent.width
width: (parent.width - Theme.spacingM) / 2
height: 80
radius: Theme.cornerRadius
color: Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency)
@@ -186,7 +179,6 @@ Column {
Row {
anchors.centerIn: parent
anchors.margins: Theme.spacingM
spacing: Theme.spacingM
Column {
@@ -205,18 +197,12 @@ Column {
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
}
}
Item {
width: Theme.spacingL
height: 1
}
Column {
anchors.verticalCenter: parent.verticalCenter
spacing: 4
width: 200
width: 120
Rectangle {
width: parent.width
@@ -243,11 +229,8 @@ Column {
NumberAnimation {
duration: Theme.mediumDuration
}
}
}
}
StyledText {
@@ -256,13 +239,21 @@ Column {
font.weight: Font.Bold
color: Theme.surfaceText
}
}
}
}
Item {
width: Theme.spacingL
height: 1
}
Rectangle {
width: (parent.width - Theme.spacingM) / 2
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 {
anchors.verticalCenter: parent.verticalCenter
@@ -276,22 +267,16 @@ Column {
}
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
color: Theme.surfaceVariantText
}
}
Item {
width: Theme.spacingL
height: 1
}
Column {
anchors.verticalCenter: parent.verticalCenter
spacing: 4
width: 200
width: 120
Rectangle {
width: parent.width
@@ -321,24 +306,19 @@ Column {
NumberAnimation {
duration: Theme.mediumDuration
}
}
}
}
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.weight: Font.Bold
color: Theme.surfaceText
}
}
}
}
}
Row {
@@ -385,7 +365,6 @@ Column {
font.weight: Font.Bold
color: Theme.surfaceText
}
}
Row {
@@ -403,13 +382,9 @@ Column {
font.weight: Font.Bold
color: Theme.surfaceText
}
}
}
}
}
Rectangle {
@@ -451,7 +426,6 @@ Column {
font.weight: Font.Bold
color: Theme.surfaceText
}
}
Row {
@@ -469,15 +443,9 @@ Column {
font.weight: Font.Bold
color: Theme.surfaceText
}
}
}
}
}
}
}

View File

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

View File

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