refactor: organize host modules and document architecture with UML
Verify Tessera GUI / verify (push) Failing after 2m2s
Verify Tessera GUI / verify (push) Failing after 2m2s
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
use super::*;
|
||||
|
||||
pub(super) fn build(p: &mut Painter, state: &mut DeveloperToolsState, viewport: Rect) {
|
||||
let x = viewport.x;
|
||||
let w = viewport.width;
|
||||
|
||||
p.label(x + 24.0, 62.0, "Appearance", TEXT, false);
|
||||
p.label(
|
||||
x + 24.0,
|
||||
90.0,
|
||||
"Accent color · tabs, focus and execution separators",
|
||||
MUTED,
|
||||
false,
|
||||
);
|
||||
for (i, color) in PALETTE.iter().enumerate() {
|
||||
let r = Rect::new(x + 24.0 + i as f32 * 44.0, 122.0, 32.0, 32.0);
|
||||
p.ui.swatch(r, Action::Theme(i), *color, *color == state.accent);
|
||||
}
|
||||
p.label(
|
||||
x + 24.0,
|
||||
176.0,
|
||||
"Custom hex · Enter to apply (bright colors adjusted)",
|
||||
MUTED,
|
||||
false,
|
||||
);
|
||||
let custom = Rect::new(x + 24.0, 204.0, 200.0, 32.0);
|
||||
p.ui.text_field(
|
||||
custom,
|
||||
Action::Focus(Focus::Custom),
|
||||
state.focus == Some(Focus::Custom),
|
||||
);
|
||||
p.label(
|
||||
custom.x + 10.0,
|
||||
custom.y + 6.0,
|
||||
&format!(
|
||||
"{}{}",
|
||||
state.custom,
|
||||
if state.focus == Some(Focus::Custom) {
|
||||
"│"
|
||||
} else {
|
||||
""
|
||||
}
|
||||
),
|
||||
TEXT,
|
||||
true,
|
||||
);
|
||||
|
||||
if !state.input_error.is_empty() {
|
||||
p.label(x + 24.0, 245.0, &state.input_error, ERROR, false);
|
||||
}
|
||||
p.fill(Rect::new(x + 24.0, 285.0, w - 48.0, 1.0), BORDER);
|
||||
p.label(x + 24.0, 305.0, "Theme preview", TEXT, false);
|
||||
p.fill(Rect::new(x + 24.0, 340.0, w - 48.0, 2.0), state.accent);
|
||||
p.label(x + 32.0, 353.0, "› \"Hello\"", TEXT, true);
|
||||
p.label(x + 32.0, 380.0, "‹ \"Hello\"", OK, true);
|
||||
p.label(
|
||||
x + 24.0,
|
||||
430.0,
|
||||
"Settings last for this window session. Source is not persisted.",
|
||||
MUTED,
|
||||
false,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user