Skip to content

Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.

style(kit): make switches black and white

leepokaib4c1472bd5e4
diff --git a/apps/linux/src/main.rs b/apps/linux/src/main.rs
index e852cdb4..b0f3ca94 100644
--- a/apps/linux/src/main.rs
+++ b/apps/linux/src/main.rs
@@ -108,8 +108,10 @@ const CSS: &str = r#"
@define-color popover_bg_color @cd_panel;
@define-color popover_fg_color @cd_text;
@define-color card_bg_color @cd_agent;
-@define-color accent_bg_color #0A84FF;
+@define-color accent_bg_color @cd_accent;
+@define-color accent_fg_color @cd_on_accent;
@define-color accent_color @cd_text;
+switch:checked > slider { background: @cd_on_accent; }
window { font-size: 12px; }
.surface { background: @cd_surface; }
diff --git a/kit/Sources/CodyncKit/Design/Theme.swift b/kit/Sources/CodyncKit/Design/Theme.swift
index 4302f5f3..78c92741 100644
--- a/kit/Sources/CodyncKit/Design/Theme.swift
+++ b/kit/Sources/CodyncKit/Design/Theme.swift
@@ -55,9 +55,6 @@ public enum Palette {
public static let accentDim = Color(light: 0xD9D9D9, dark: 0x333333)
public static let danger = Color(light: 0xC23A2B, dark: 0xF0A7A7)
public static let warning = Color(hex: 0xF0A030)
- /// On-state for switches. Not the ink accent: a white track in dark mode
- /// hides the white knob, so switches use a system-style blue (as in Grok Bot).
- public static let switchOn = Color(light: 0x0A84FF, dark: 0x0A84FF)
public static let codeBackground = Color(light: 0xF4F4F4, dark: 0x111111)
public static let added = Color(light: 0x2E7D32, dark: 0x8FD18B)
public static let removed = Color(light: 0xC62828, dark: 0xF0A7A7)
diff --git a/kit/Sources/CodyncUI/Controls.swift b/kit/Sources/CodyncUI/Controls.swift
index 6b5fb0dd..32a2ef70 100644
--- a/kit/Sources/CodyncUI/Controls.swift
+++ b/kit/Sources/CodyncUI/Controls.swift
@@ -38,10 +38,11 @@ public struct CodyncSwitch: ToggleStyle {
configuration.label
Spacer(minLength: 0)
Capsule()
- .fill(configuration.isOn ? Palette.switchOn : Palette.bubbleUser)
+ .fill(configuration.isOn ? Palette.accentFill : Palette.bubbleUser)
.frame(width: 34, height: 20)
.overlay(alignment: configuration.isOn ? .trailing : .leading) {
- Circle().fill(.white).padding(2)
+ // Black and white: the knob takes the opposite ink of an on track.
+ Circle().fill(configuration.isOn ? Palette.onAccent : .white).padding(2)
}
}
.contentShape(Rectangle())