From 232b452b11a9d87e2d3de30afe35d9ca389ecf76 Mon Sep 17 00:00:00 2001 From: loner <2788892716@qq.com> Date: Tue, 7 Oct 2025 04:43:49 +0800 Subject: [PATCH] fix(settings): make color scheme grid layout responsive The color scheme grid previously used a fixed number of columns, which caused cards to be partially clipped when the window width was narrow. This change makes the number of columns dynamically calculated based on the available width. It ensures the grid layout gracefully adapts from 3 (or more) columns down to 1 column, preventing content overflow and clipping. This fixes a UI bug where the right-side content of color scheme cards was not visible at certain window widths. --- Modules/Settings/Tabs/ColorSchemeTab.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Settings/Tabs/ColorSchemeTab.qml b/Modules/Settings/Tabs/ColorSchemeTab.qml index 22f403f4..fa2f84fa 100644 --- a/Modules/Settings/Tabs/ColorSchemeTab.qml +++ b/Modules/Settings/Tabs/ColorSchemeTab.qml @@ -220,7 +220,7 @@ ColumnLayout { // Color Schemes Grid GridLayout { - columns: 3 + columns: Math.max(1, Math.floor((root.width + columnSpacing) / (222 * scaling + columnSpacing))) rowSpacing: Style.marginM * scaling columnSpacing: Style.marginM * scaling Layout.fillWidth: true