diff options
Diffstat (limited to 'desktop/modules/appearance/ThemeTab.qml')
| -rw-r--r-- | desktop/modules/appearance/ThemeTab.qml | 9 |
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) |
