MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / draw_tab_title

Function draw_tab_title

crates/openshell-tui/src/ui/global_settings.rs:97–115  ·  view source on GitHub ↗

Draw the tab title showing Providers | Global Settings.

(app: &App, focused: bool)

Source from the content-addressed store, hash-verified

95
96/// Draw the tab title showing Providers | Global Settings.
97pub fn draw_tab_title(app: &App, focused: bool) -> Line<'_> {
98 let t = &app.theme;
99 let prov_style = if app.middle_pane_tab == MiddlePaneTab::Providers {
100 if focused { t.heading } else { t.text }
101 } else {
102 t.muted
103 };
104 let gs_style = if app.middle_pane_tab == MiddlePaneTab::GlobalSettings {
105 if focused { t.heading } else { t.text }
106 } else {
107 t.muted
108 };
109
110 Line::from(vec![
111 Span::styled(" Providers", prov_style),
112 Span::styled(" | ", t.border),
113 Span::styled("Global Settings ", gs_style),
114 ])
115}
116
117fn draw_edit_overlay(
118 frame: &mut Frame<'_>,

Callers 3

drawFunction · 0.85
drawFunction · 0.85
draw_v2Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected