Skip to content

Commit 8fa421f

Browse files
committed
fix(linux): M8 — header-suffix '+' button on Saved Connections group
Adds a flat list-add-symbolic button as the AdwPreferencesGroup header_suffix, mirroring the GNOME Settings pattern (Wi-Fi, Online Accounts, Bluetooth) where the primary affordance for the group lives next to its title. Keyboard nav now reaches the new-connection action without escaping the group to the headerbar, and the '+' is the obvious entry point for users scanning for an "add" action without seeing the bottom pill. Bottom pill stays for visual prominence (the welcome page is still the user's first surface, where a big suggested-action button reads better than a corner icon).
1 parent 8d5b5f5 commit 8fa421f

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

linux/crates/app/src/ui/app.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1558,6 +1558,15 @@ impl App {
15581558
let group = adw::PreferencesGroup::builder()
15591559
.title(crate::tr!("Saved connections"))
15601560
.build();
1561+
let header_new_btn = gtk::Button::builder()
1562+
.icon_name("list-add-symbolic")
1563+
.tooltip_text(crate::tr!("New connection"))
1564+
.valign(gtk::Align::Center)
1565+
.build();
1566+
header_new_btn.add_css_class("flat");
1567+
let s_header = sender.clone();
1568+
header_new_btn.connect_clicked(move |_| s_header.input(AppMsg::OpenConnect));
1569+
group.set_header_suffix(Some(&header_new_btn));
15611570
let mut first_row: Option<adw::ActionRow> = None;
15621571
for saved in &self.saved_connections {
15631572
let subtitle = if saved.driver_id == "sqlite" {

0 commit comments

Comments
 (0)