From 1e35e91fce74a8dcfb68b6a65b31d8610b4dc8c1 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sun, 17 Aug 2025 20:22:31 +0800 Subject: style(Launcher): components to make it looks more dynamic including contrasting coloring, scales --- launcher/components/Spell.qml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'launcher/components/Spell.qml') diff --git a/launcher/components/Spell.qml b/launcher/components/Spell.qml index 6cd847c..52f32b1 100644 --- a/launcher/components/Spell.qml +++ b/launcher/components/Spell.qml @@ -145,8 +145,6 @@ IComponent { flow: GridView.FlowLeftToRight snapMode: GridView.NoSnap - // Compute a reasonable cell width based on font size, keeping - // roughly the same behavior as before. cellWidth: Math.floor(width / Math.max(1, Math.floor(width / Math.max(1, Math.round(Launcher.widgetFontSize * 6))))) cellHeight: Math.ceil(Launcher.widgetFontSize * 1.6) + Launcher.innerMargin * 2 @@ -156,6 +154,7 @@ IComponent { width: grid.cellWidth height: chipContent.implicitHeight + Launcher.innerMargin * 2 + scale: index === selectedIndex ? 1.03 : 0.97 IRect { anchors.fill: parent @@ -168,6 +167,7 @@ IComponent { text: modelData font.pixelSize: Launcher.widgetFontSize elide: Text.ElideRight + color: index === selectedIndex ? Colors.foreground1 : Colors.foreground2 } MouseArea { @@ -181,6 +181,10 @@ IComponent { } } } + + Behavior on scale { + ISpringAnimation {} + } } Component.onCompleted: { -- cgit v1.2.3