Skip to content

Commit

The desktop app's settings are a button in its title bar. A Settings button sits at the right of the bar, before the window's own buttons (and at its end on macOS), so the runner and the rest are a click away instead of only in the File menu, the tray or the account menu.

syntaqxcommitted Parent918116eBrowse files
3 files+18−30/3 viewed
+9−0
3636 back: svg('<polyline points="9.5,3.5 5,8 9.5,12.5"/><line x1="5" y1="8" x2="13" y2="8"/>'),
3737 forward: svg('<polyline points="6.5,3.5 11,8 6.5,12.5"/><line x1="3" y1="8" x2="11" y2="8"/>'),
3838 search: svg('<circle cx="7" cy="7" r="4"/><line x1="10" y1="10" x2="13" y2="13"/>'),
39+ settings: svg('<line x1="2.5" y1="4.5" x2="13.5" y2="4.5"/><line x1="2.5" y1="11.5" x2="13.5" y2="11.5"/><circle cx="10" cy="4.5" r="1.75" fill="var(--bg)"/><circle cx="6" cy="11.5" r="1.75" fill="var(--bg)"/>'),
3940 minimize: svg('<line x1="3.5" y1="8" x2="12.5" y2="8"/>'),
4041 maximize: svg('<rect x="3.5" y="3.5" width="9" height="9" rx="1"/>'),
4142 restore: svg('<rect x="3.5" y="5.5" width="7" height="7" rx="1"/><path d="M5.5 5.5V4.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1h-1"/>'),
7879 });
7980 left.append(back, forward);
8081
82+ // The app's settings (the runner among them), at the right of the bar,
83+ // before the window's buttons: where they are found without the menu.
84+ right.append(
85+ button("icon", "Settings", "settings", function () {
86+ act("settings");
87+ }),
88+ );
89+
8190 var maximize = null;
8291 function drawMaximized(maximized) {
8392 if (!maximize) return;
+5−0
263263 "back" => site.eval("history.back()").map_err(|error| error.to_string())?,
264264 "forward" => site.eval("history.forward()").map_err(|error| error.to_string())?,
265265 "search" => app.emit_to(EventTarget::webview(SITE), SEARCH_EVENT, ()).map_err(|error| error.to_string())?,
266+ // The app's settings, a click away rather than only in its menu.
267+ "settings" => {
268+ crate::settings::open(app);
269+ return Ok(());
270+ }
266271 "focus" => {}
267272 other => return Err(format!("the bar cannot {other}")),
268273 }
+4−3
120120
121121 ## Settings
122122
123−The app's own settings are in a window of their own: **Settings** in the
124−File menu (the g1t menu on macOS), **Settings…** in the tray, or **Desktop
125−app settings** in your account menu on g1t. Each change takes effect at
123+The app's own settings are in a window of their own: the **Settings**
124+button at the right of the title bar, **Settings** in the File menu (the
125+g1t menu on macOS) or Ctrl+, (⌘, on macOS), **Settings…** in the tray, or
126+**Desktop app settings** in your account menu on g1t. Each change takes effect at
126127 once and is kept on this computer. Your account's settings, which things
127128 notify you among them, stay on g1t, in [your settings](/guides/notifications/#settings).
128129