KeSp_controller/ui/main.slint
Mae PUGIN 32ee3a6d26 feat: Complete KeSp Controller — Slint UI port
Full port of the KaSe/KeSp split keyboard configurator from egui to Slint:
- 6 tabs: Keymap, Advanced, Macros, Stats, Settings, Flash
- Responsive keyboard view with scale-to-fit and key rotations
- Key selector popup with categorized grid, MT/LT builders, hex input
- Combo key picker with inline keyboard visual
- Macro step builder with visual tags
- Serial communication via background threads + mpsc polling
- Heatmap overlay with blue-yellow-red gradient
- OTA flasher with prog port VID filtering and partition selector
- WPM polling, Tamagotchi, Autoshift controls
- Dracula theme matching egui version

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 20:40:34 +02:00

62 lines
1.8 KiB
Text

import { TabWidget } from "std-widgets.slint";
import { Theme } from "theme.slint";
import { AppState, ActiveTab } from "globals.slint";
import { ConnectionBar } from "components/connection_bar.slint";
import { StatusBar } from "components/status_bar.slint";
import { KeySelector } from "components/key_selector.slint";
import { TabKeymap } from "tabs/tab_keymap.slint";
import { TabAdvanced } from "tabs/tab_advanced.slint";
import { TabMacros } from "tabs/tab_macros.slint";
import { TabStats } from "tabs/tab_stats.slint";
import { TabSettings } from "tabs/tab_settings.slint";
import { TabFlasher } from "tabs/tab_flasher.slint";
export { AppState, Theme }
export { ConnectionBridge, KeymapBridge, SettingsBridge, StatsBridge, AdvancedBridge, MacroBridge, FlasherBridge, KeySelectorBridge } from "globals.slint";
export component MainWindow inherits Window {
title: "KaSe Controller";
preferred-width: 1000px;
preferred-height: 700px;
min-width: 600px;
min-height: 450px;
background: Theme.bg-primary;
VerticalLayout {
ConnectionBar { }
TabWidget {
vertical-stretch: 1;
Tab {
title: "Keymap";
TabKeymap { }
}
Tab {
title: "Advanced";
TabAdvanced { }
}
Tab {
title: "Macros";
TabMacros { }
}
Tab {
title: "Stats";
TabStats { }
}
Tab {
title: "Settings";
TabSettings { }
}
Tab {
title: "Flash";
TabFlasher { }
}
}
StatusBar { }
}
// Modal overlay (above everything)
KeySelector { }
}