Add Sidebar / Layout cards to appearance form
Below the appearance rows the Appearance form now exposes the design's "Sidebar / Layout" section: serif "Layout" sub-headline plus a 2-up preview-card grid wired to the active space's sidebar_width — Single column lands on DEFAULT_SIDEBAR_WIDTH_PX, Compact lands on COLLAPSED_SIDEBAR_WIDTH_PX. Each card draws a miniature sidebar + canvas preview so the choice reads at a glance. The shell exposes a new set_active_sidebar_width helper alongside the existing toggle so the cards mutate state without re-implementing the toggle logic. The "Hidden on hover" preset from the design is omitted until that mode actually ships — no placeholder option. The cards live in chrome::appearance_layout_cards so appearance_form stays under 500 lines.
This commit is contained in:
@@ -8,6 +8,8 @@ use gpui::{
|
||||
};
|
||||
use gpui_component::{IconName, scroll::ScrollableElement};
|
||||
|
||||
use super::appearance_layout_cards::render_sidebar_layout_section;
|
||||
|
||||
use crate::shell::ElyShell;
|
||||
use crate::shell::chrome::SERIF_FAMILY;
|
||||
|
||||
@@ -31,7 +33,8 @@ pub(crate) fn render_appearance_form(
|
||||
.gap(px(28.0))
|
||||
.child(render_header())
|
||||
.child(render_wallpaper_grid(snapshot, cx))
|
||||
.child(render_appearance_rows(snapshot, cx)),
|
||||
.child(render_appearance_rows(snapshot, cx))
|
||||
.child(render_sidebar_layout_section(snapshot, cx)),
|
||||
)
|
||||
.into_any_element()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user