zit-studio-code index
From: Oliver Lin <oli...@liuxiaozhen.dev>
To: zit-studio-code@googlegroups.com
Subject: [GitTune][PATCH 2/3] feat(ui): restyle to GNOME Adwaita-inspired
 settings layout
Date: Tue, 06 Oct 2026 07:49:46 +0000
Message-ID: <jyT6XnOjAQAJ.NUITClLYXwc@googlegroups.com>
+component NavItem inherits Rectangle {
+    in property <string> label;
+    in property <string> icon;
+    in property <bool> selected;
+    callback clicked();
+
+    height: 40px;
+    border-radius: 8px;
+    background: root.selected ? #ffffff1f : touch.has-hover ? #ffffff10 : transparent;
+
+    HorizontalLayout {
+        padding-left: 14px;
+        padding-right: 14px;
+        spacing: 12px;
+
+        Text {
+            text: root.icon;
+            color: root.selected ? Adw.text : Adw.text-dim;
+            font-size: 15px;
+            vertical-alignment: center;
+        }
+
+        Text {
+            text: root.label;
+            color: root.selected ? Adw.text : #d4d4da;
+            font-size: 14px;
+            font-weight: root.selected ? 700 : 400;
+            vertical-alignment: center;
+        }
+    }
+
+    touch := TouchArea {
+        mouse-cursor: pointer;
+        clicked => {
+            root.clicked();
+        }
+    }
+}
+
+component PillButton inherits Rectangle {
+    in property <string> label;
+    callback clicked();
+
+    width: 110px;
+    height: 40px;
+    border-radius: 20px;
+    background: touch.pressed ? Adw.accent.darker(10%) : touch.has-hover ? Adw.accent-hover : Adw.accent;
+
+    Text {
+        text: root.label;
+        color: white;
+        font-size: 14px;
+        font-weight: 700;
+    }
+
+    touch := TouchArea {
+        mouse-cursor: pointer;
+        clicked => {
+            root.clicked();
+        }
+    }
+}
+
+component Segmented inherits Rectangle {
+    in property <[string]> options;
+    in-out property <string> value;
+
+    height: 38px;
+    background: Adw.well-bg;
+    border-radius: 9px;
+
+    HorizontalLayout {
+        padding: 3px;
+        spacing: 3px;
+
+        for opt in root.options: Rectangle {
+            border-radius: 7px;
+            background: root.value == opt ? Adw.accent : seg-touch.has-hover ? #ffffff12 : transparent;
+
+            Text {
+                text: opt;
+                color: root.value == opt ? white : Adw.text-dim;
+                font-size: 13px;
+                font-weight: root.value == opt ? 700 : 400;
+            }
+
+            seg-touch := TouchArea {
+                mouse-cursor: pointer;
+                clicked => {
+                    root.value = opt;
+                }
+            }
+        }
+    }
+}
+
+component ToggleRow inherits Rectangle {
+    in property <string> label;
+    in-out property <bool> checked;
+
+    height: 46px;
+
+    HorizontalLayout {
+        padding-left: 2px;
+        padding-right: 2px;
+
+        Text {
+            text: root.label;
+            color: Adw.text;
+            font-size: 14px;


[previous | next | thread start | thread overview | mbox]

archive of zit-studio-code@googlegroups.com