This commit is contained in:
2026-10-23 11:06:34 +07:00
parent 1c00bc7956
commit e4ebe96077
10 changed files with 200 additions and 182 deletions
+5
View File
@@ -167,11 +167,16 @@ impl RenderOnce for PixelAvatar {
}
}
// Pad the grid so the art stays clear of the circular edge, keeping the
// inset look of signed's rounded-square frame.
let inset = self.side / (GRID_SIZE as f32 * 2.);
div()
.grid()
.grid_cols(GRID_SIZE as u16)
.grid_rows(GRID_SIZE as u16)
.size(self.side)
.p(inset)
.flex_shrink_0()
.rounded_full()
.overflow_hidden()
+28
View File
@@ -0,0 +1,28 @@
use gpui::{App, Div, IntoElement, ParentElement, SharedString, Styled, div};
use gpui_kit::component::{ActiveTheme, h_flex, v_flex};
/// A settings row: the label and description on the left, the control on the right.
pub fn settings_row(
label: impl Into<SharedString>,
description: impl Into<SharedString>,
control: impl IntoElement,
cx: &App,
) -> Div {
h_flex()
.gap_3()
.items_center()
.justify_between()
.child(
v_flex()
.flex_1()
.min_w_0()
.child(div().text_sm().child(label.into()))
.child(
div()
.text_xs()
.text_color(cx.theme().muted_foreground)
.child(description.into()),
),
)
.child(control)
}
+2
View File
@@ -1,10 +1,12 @@
pub use avatar::Avatar;
pub use form::*;
pub use icon::IconName;
pub use message::*;
pub use text::*;
pub use window_drag::title_bar_drag_handlers;
pub mod avatar;
pub mod form;
pub mod icon;
pub mod message;
pub mod text;