From 5e7295a63164f6b4aa0021bbc65f38d2b960926e Mon Sep 17 00:00:00 2001 From: Eshayat Al-Wasiu Date: Tue, 27 Oct 2026 17:48:19 +0600 Subject: [PATCH] Align server deletion controls with the settings rows Co-Authored-By: Codex (GPT-6.1) --- launcher/src/servers_page.rs | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/launcher/src/servers_page.rs b/launcher/src/servers_page.rs index eb6ffef50..d6c76235c 100644 --- a/launcher/src/servers_page.rs +++ b/launcher/src/servers_page.rs @@ -2376,11 +2376,17 @@ impl Launcher { } else { "You’ll be asked to confirm before anything is moved." }; - let mut section = div().flex().flex_col().gap(px(12.)).mt(px(24.)) - .pt(px(24.)).border_t_1().border_color(t.rule) + let about = div().flex().flex_col().flex_1().min_w_0().gap(px(8.)) .child(text(theme::HEADING).text_color(t.danger).child("Delete server")) .child(text(theme::UI).text_color(t.ink_soft) .child("Remove this server from Horizon and move its worlds, settings and backups to the trash.")); + let mut controls = div() + .flex() + .flex_col() + .items_end() + .flex_none() + .w(px(260.)) + .gap(px(12.)); if self.servers.confirm_delete { let matches = self.servers.value(Field::DeleteServer) == name && !name.is_empty(); let field = self.field(Field::DeleteServer, "Server name", 260., cx); @@ -2406,7 +2412,7 @@ impl Launcher { } else { disabled(confirm) }; - section = section + controls = controls .child(text(theme::UI).text_color(t.ink).child( gpui::StyledText::new(format!("Type {name} to confirm.")).with_highlights([( 5..5 + name.len(), @@ -2445,9 +2451,26 @@ impl Launcher { } else { disabled(delete) }; - section = section.child(div().flex().child(delete)); + controls = controls.child(delete); } - section.child(text(theme::CAPTION).text_color(t.muted).child(hint)) + div() + .flex() + .items_start() + .gap(px(24.)) + .mt(px(24.)) + .pt(px(24.)) + .border_t_1() + .border_color(t.rule) + .child(about) + .child( + controls.child( + text(theme::CAPTION) + .text_color(t.muted) + .w(px(260.)) + .text_align(gpui::TextAlign::Right) + .child(hint), + ), + ) } fn background_row(&mut self, cx: &mut Context) -> Div {