From de32b86f7c8718fc67158e624ab34406c3bf00d7 Mon Sep 17 00:00:00 2001 From: LemmyCook Date: Mon, 1 Sep 2025 15:11:37 -0400 Subject: [PATCH] SettingsPanel: Improved auto-sizing so it should work well on large and small screens --- Modules/SettingsPanel/SettingsPanel.qml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Modules/SettingsPanel/SettingsPanel.qml b/Modules/SettingsPanel/SettingsPanel.qml index d2c76ba..b78c68f 100644 --- a/Modules/SettingsPanel/SettingsPanel.qml +++ b/Modules/SettingsPanel/SettingsPanel.qml @@ -11,10 +11,14 @@ import qs.Widgets NPanel { id: root - panelWidth: Math.round(Math.max(screen?.width * 0.4, 1000) * scaling) + panelWidth: { + var width = Math.round(Math.max(screen?.width * 0.4, 1000) * scaling) + width = Math.min(width, screen?.width - Style.marginL * 2) + return width + } panelHeight: { var height = Math.round(Math.max(screen?.height * 0.75, 800) * scaling) - height = Math.min(height, screen?.height - Style.barHeight * scaling) + height = Math.min(height, screen?.height - Style.barHeight * scaling - Style.marginL * 2) return height } panelAnchorHorizontalCenter: true