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>
97 lines
2.8 KiB
Text
97 lines
2.8 KiB
Text
import { ComboBox } from "std-widgets.slint";
|
|
import { Theme } from "../theme.slint";
|
|
import { SettingsBridge } from "../globals.slint";
|
|
|
|
export component TabSettings inherits Rectangle {
|
|
background: Theme.bg-primary;
|
|
|
|
VerticalLayout {
|
|
padding: 20px;
|
|
spacing: 16px;
|
|
alignment: start;
|
|
|
|
Text {
|
|
text: "Settings";
|
|
color: Theme.fg-primary;
|
|
font-size: 20px;
|
|
font-weight: 700;
|
|
}
|
|
|
|
// Keyboard layout section
|
|
Rectangle {
|
|
background: Theme.bg-secondary;
|
|
border-radius: 8px;
|
|
height: 80px;
|
|
|
|
HorizontalLayout {
|
|
padding: 16px;
|
|
spacing: 12px;
|
|
alignment: start;
|
|
|
|
VerticalLayout {
|
|
alignment: center;
|
|
Text {
|
|
text: "Keyboard Layout";
|
|
color: Theme.fg-primary;
|
|
font-size: 14px;
|
|
}
|
|
Text {
|
|
text: "Controls how keycodes are displayed (label remapping)";
|
|
color: Theme.fg-secondary;
|
|
font-size: 11px;
|
|
}
|
|
}
|
|
|
|
Rectangle { horizontal-stretch: 1; }
|
|
|
|
VerticalLayout {
|
|
alignment: center;
|
|
ComboBox {
|
|
width: 200px;
|
|
model: SettingsBridge.available-layouts;
|
|
current-index <=> SettingsBridge.selected-layout-index;
|
|
selected(value) => {
|
|
SettingsBridge.change-layout(self.current-index);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// About section
|
|
Rectangle {
|
|
background: Theme.bg-secondary;
|
|
border-radius: 8px;
|
|
|
|
VerticalLayout {
|
|
padding: 16px;
|
|
spacing: 8px;
|
|
|
|
Text {
|
|
text: "About";
|
|
color: Theme.fg-primary;
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
}
|
|
Text {
|
|
text: "KaSe Controller v0.6.0";
|
|
color: Theme.fg-secondary;
|
|
font-size: 12px;
|
|
}
|
|
Text {
|
|
text: "Split keyboard configurator — Slint UI port";
|
|
color: Theme.fg-secondary;
|
|
font-size: 12px;
|
|
}
|
|
Text {
|
|
text: "Made with Slint";
|
|
color: Theme.accent-purple;
|
|
font-size: 11px;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Spacer
|
|
Rectangle { vertical-stretch: 1; }
|
|
}
|
|
}
|