feat: Add card-based layout with theme tokens

Add a card-based UI layout with consistent spacing and visual hierarchy.
The main content and sidebar are now wrapped in styled cards with gaps
between them. New theme tokens (card, raised, hover, divider,
disabled_fg) provide semantic colors for different surface levels and
states.

Create ui.rs module with helper functions (card_style, divider_h,
section_header, priority_badge) to keep styling consistent across views.
This commit is contained in:
Ignacio Perez
2025-12-27 18:44:45 -03:00
parent 3ce8886fc9
commit 58f4f2bfd0
8 changed files with 377 additions and 199 deletions
+5 -6
View File
@@ -1,6 +1,7 @@
use gpui::{Context, IntoElement, Render, Window, div, prelude::*, px};
use crate::theme::ActiveTheme;
use crate::ui::{card_style, CARD_RADIUS};
pub struct StatusBar {
// TODO: Add vim_mode, sync_state, last_sync, etc.
@@ -16,16 +17,14 @@ impl Render for StatusBar {
fn render(&mut self, _window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
let theme = cx.theme().clone();
div()
card_style(div(), &theme)
.flex()
.items_center()
.justify_between()
.w_full()
.h(px(30.0))
.px_4()
.h(px(28.0))
.px_3()
.py_1()
.bg(theme.panel)
.border_b_1()
.border_color(theme.border)
.rounded(CARD_RADIUS)
}
}