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.
3 files+18−30/3 viewed
| 36 | 36 | back: svg('<polyline points="9.5,3.5 5,8 9.5,12.5"/><line x1="5" y1="8" x2="13" y2="8"/>'), | |
| 37 | 37 | forward: svg('<polyline points="6.5,3.5 11,8 6.5,12.5"/><line x1="3" y1="8" x2="11" y2="8"/>'), | |
| 38 | 38 | 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)"/>'), | |
| 39 | 40 | minimize: svg('<line x1="3.5" y1="8" x2="12.5" y2="8"/>'), | |
| 40 | 41 | maximize: svg('<rect x="3.5" y="3.5" width="9" height="9" rx="1"/>'), | |
| 41 | 42 | 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"/>'), | |
| ⋯ | |||
| 78 | 79 | }); | |
| 79 | 80 | left.append(back, forward); | |
| 80 | 81 | ||
| 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 | + | ||
| 81 | 90 | var maximize = null; | |
| 82 | 91 | function drawMaximized(maximized) { | |
| 83 | 92 | if (!maximize) return; | |
| 263 | 263 | "back" => site.eval("history.back()").map_err(|error| error.to_string())?, | |
| 264 | 264 | "forward" => site.eval("history.forward()").map_err(|error| error.to_string())?, | |
| 265 | 265 | "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 | + | } | |
| 266 | 271 | "focus" => {} | |
| 267 | 272 | other => return Err(format!("the bar cannot {other}")), | |
| 268 | 273 | } |
| 120 | 120 | ||
| 121 | 121 | ## Settings | |
| 122 | 122 | ||
| 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 | |
| 126 | 127 | once and is kept on this computer. Your account's settings, which things | |
| 127 | 128 | notify you among them, stay on g1t, in [your settings](/guides/notifications/#settings). | |
| 128 | 129 |