Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions crates/zet-gpu/src/presentation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,35 +43,35 @@ impl UiTextStyle {
}

/// Compact geometric wordmark role for the application identity.
pub const UI_BRAND: UiTextStyle = UiTextStyle::new(26.0, 30.0, 700, 1.1, UiFontFamily::SansSerif);
pub const UI_BRAND: UiTextStyle = UiTextStyle::new(28.0, 32.0, 700, 0.9, UiFontFamily::SansSerif);

/// Upper application/header labels.
pub const UI_HEADER: UiTextStyle = UiTextStyle::new(15.0, 19.0, 700, 1.45, UiFontFamily::Monospace);
pub const UI_HEADER: UiTextStyle = UiTextStyle::new(16.5, 21.0, 700, 0.8, UiFontFamily::Monospace);

/// Indexed section headings such as `COMMAND LEDGER`.
pub const UI_SECTION: UiTextStyle =
UiTextStyle::new(14.0, 18.0, 700, 1.05, UiFontFamily::Monospace);
UiTextStyle::new(15.0, 19.0, 700, 1.05, UiFontFamily::Monospace);

/// Ordinary native labels and observed values.
pub const UI_BODY: UiTextStyle = UiTextStyle::new(13.5, 18.0, 400, 0.1, UiFontFamily::Monospace);
pub const UI_BODY: UiTextStyle = UiTextStyle::new(15.5, 20.0, 400, 0.1, UiFontFamily::Monospace);

/// Compact state, path, and provenance metadata.
pub const UI_META: UiTextStyle = UiTextStyle::new(11.5, 16.0, 500, 0.15, UiFontFamily::Monospace);
pub const UI_META: UiTextStyle = UiTextStyle::new(12.5, 17.0, 500, 0.2, UiFontFamily::Monospace);

/// Session identity role: larger than supporting state while remaining below
/// the selected command focal point.
pub const UI_SESSION: UiTextStyle =
UiTextStyle::new(15.0, 18.0, 600, 0.05, UiFontFamily::Monospace);
UiTextStyle::new(16.5, 20.0, 600, 0.05, UiFontFamily::Monospace);

/// Selected command identity and other high-salience evidence labels.
pub const UI_COMMAND: UiTextStyle =
UiTextStyle::new(16.5, 20.0, 600, 0.05, UiFontFamily::Monospace);
UiTextStyle::new(17.0, 21.0, 600, 0.05, UiFontFamily::Monospace);

/// Important observed values such as exit status and duration.
pub const UI_VALUE: UiTextStyle = UiTextStyle::new(15.0, 18.0, 500, 0.05, UiFontFamily::Monospace);
pub const UI_VALUE: UiTextStyle = UiTextStyle::new(16.0, 19.0, 500, 0.05, UiFontFamily::Monospace);

/// Captured output stays readable and dense without inheriting terminal cells.
pub const UI_OUTPUT: UiTextStyle = UiTextStyle::new(13.0, 16.0, 400, 0.0, UiFontFamily::Monospace);
pub const UI_OUTPUT: UiTextStyle = UiTextStyle::new(14.5, 18.0, 400, 0.0, UiFontFamily::Monospace);

/// Pixel-space rectangle used by presentation geometry and hit-test helpers.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
Expand Down
17 changes: 17 additions & 0 deletions crates/zet-gpu/src/renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,23 @@ impl Renderer {
));
}
}
if let Some((start, end)) = segments.get(active) {
let (cw, ch) = (self.cell_w as u32, self.cell_h as u32);
let x = (*start as u32).saturating_mul(cw);
let width = end.saturating_sub(*start) as u32 * cw;
if width > 0 {
self.draw_rect_px(
x,
(row as u32)
.saturating_add(1)
.saturating_mul(ch)
.saturating_sub(2),
width,
2,
PANEL_CYAN,
);
}
}
}

/// Tab bar variant with an excluded leading rail region.
Expand Down
18 changes: 18 additions & 0 deletions crates/zet/src/window/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,16 @@ impl From<LayoutMode> for Layout {
}
}

/// Truthful chrome label for the effective (not requested) panel state.
pub fn chrome_mode_label(rail: bool, inspector: bool) -> &'static str {
match (rail, inspector) {
(true, true) => "MISSION CONTROL",
(true, false) => "WORKSPACE",
(false, true) => "EVIDENCE VIEW",
(false, false) => "TERMINAL FOCUS",
}
}

/// A cell rectangle inside the window grid.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct Viewport {
Expand Down Expand Up @@ -304,6 +314,14 @@ fn proportional_panel_cols(cols: u32, percent: u32, minimum: u32) -> u32 {
mod tests {
use super::*;

#[test]
fn chrome_mode_label_tracks_effective_panels() {
assert_eq!(chrome_mode_label(false, false), "TERMINAL FOCUS");
assert_eq!(chrome_mode_label(true, false), "WORKSPACE");
assert_eq!(chrome_mode_label(false, true), "EVIDENCE VIEW");
assert_eq!(chrome_mode_label(true, true), "MISSION CONTROL");
}

#[test]
fn terminal_focus_is_the_full_width_grid() {
let layout = LayoutMode::TerminalFocus.layout();
Expand Down
Loading
Loading