aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-11-09 11:41:23 +0100
committerDanilo M. <danix@danix.xyz>2026-11-09 11:41:23 +0100
commit57813295282ea5c67ee5c8c7dc49640e2c7224bf (patch)
treec571ac64b4ed99a43ff8acda539e881652cefb12
parent2fc1a950828bf9f1977e31e7b0cdaf5e991adbbd (diff)
downloadquickshell-57813295282ea5c67ee5c8c7dc49640e2c7224bf.tar.gz
quickshell-57813295282ea5c67ee5c8c7dc49640e2c7224bf.zip
theme: schemes as a wrapping grid, not one long column
With 23 schemes the page was a long scroll. Cards now flow into as many columns as fit at 380px, the width the mock and seven swatches need. Search still finds a card by objectName and scrolls via mapToItem, which a Flow does not change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
-rw-r--r--desktop/modules/appearance/ThemeTab.qml9
1 files changed, 6 insertions, 3 deletions
diff --git a/desktop/modules/appearance/ThemeTab.qml b/desktop/modules/appearance/ThemeTab.qml
index b842c32..c27a260 100644
--- a/desktop/modules/appearance/ThemeTab.qml
+++ b/desktop/modules/appearance/ThemeTab.qml
@@ -14,10 +14,13 @@ import "../.."
// Colour schemes from unified-desktop-theme, each with its swatches and a mock
// of a panel in its colours. Clicking one stages it; Apply in the header runs
-// install.sh, as the wallpaper page does.
-Column {
+// install.sh, as the wallpaper page does. Cards wrap into as many columns as
+// fit, so 23 schemes are a grid rather than one long scroll.
+Flow {
id: tab
spacing: 10
+ // 380 is the card's content: mock, gap, seven swatches, margins.
+ readonly property int cols: Math.max(1, Math.floor((width + spacing) / (380 + spacing)))
Repeater {
model: Udt.names
@@ -30,7 +33,7 @@ Column {
readonly property bool isCurrent: Udt.current === modelData
readonly property bool isPending: Udt.pending === modelData && !isCurrent
- width: tab.width
+ width: (tab.width - (tab.cols - 1) * tab.spacing) / tab.cols
implicitHeight: 96
radius: 10
color: hover.hovered ? Qt.alpha(Theme.surface, 0.75)