Compare commits

...
4 Commits
Author SHA1 Message Date
Ansho Rei f6e303bd0f fix: give the window the app id so docks show the remus icon
Without an app id on Wayland, or a WM_CLASS on X11, a dock cannot link
the window to me.anshorei.Fettleshed.Remus.desktop and draws a generic
icon. The desktop file also names the class in StartupWMClass.
2026-11-07 03:34:28 +01:00
Ansho Rei d0f1b6c95a feat: add a Controls page and keep only contextual hints in the bar
Settings lists every button and key, grouped by where it works and drawn
for the controller in use or the keyboard. The controls bar drops what
works the same everywhere, such as Back, Play / Pause and Sections, so
the hints that depend on the selection are no longer pushed aside. The
login screen keeps all its hints, since Settings is out of reach there.

Bumps the version to 0.10.3.
2026-11-07 00:13:59 +01:00
Ansho Rei c6944041ea fix: release the screensaver when leaving the last server while playing
Leaving the browsed server for the login screen stopped the player but
never updated the screensaver inhibit, and stop_player drops the events
that would have. The playback reset from switch_server is now a helper
that also syncs the inhibit, used for both paths, so logging in again
starts without the old queue's pause, position or restore state.

Bumps the version to 0.10.2.
2026-11-06 23:44:50 +01:00
Ansho Rei f03374b585 feat: replace the login screen's Exit button with an X in the corner
The full-width button under Connect took a row in a card that is close
to filling an 800 px high screen. The X is a focus stop between the
saved servers and the address field, so Up from the address field still
reaches it from a controller.

Bumps the version to 0.10.1.
2026-11-06 23:35:37 +01:00
9 changed files with 353 additions and 74 deletions
+25
View File
@@ -2,6 +2,31 @@
One section per version, newest first.
## v0.10.4 (2026-11-07)
### Bug fixes
- The dock and taskbar show the remus icon for its window. The window now carries the app id me.anshorei.Fettleshed.Remus, which links it to the installed desktop file.
## v0.10.3 (2026-11-07)
### Features
- Settings has a Controls page listing every button and key, grouped by where it works, drawn for the controller in use or the keyboard.
- The controls bar shows only the controls that depend on the selection or the screen. Back, Play / Pause, Sections, Now playing, Search, Skip, Seek, Volume and Mute, and Select where it only opens something, are on the Controls page instead. The login screen is unchanged.
## v0.10.2 (2026-11-06)
### Bug fixes
- Leaving the last logged-in server while music plays, by logging out, forgetting it or a turned-down saved login, lets the screensaver run again on the login screen. Logging in after that starts with no leftover pause, position or restore state from the old queue.
## v0.10.1 (2026-11-06)
### Features
- Exit on the login screen is an X in the top right corner of the card instead of a button under Connect, which makes the card shorter. Up from the address field reaches it on a controller. When adding a server it cancels, as the button did.
## v0.10.0 (2026-11-06)
### Features
Generated
+1 -1
View File
@@ -4385,7 +4385,7 @@ checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
[[package]]
name = "remus"
version = "0.10.0"
version = "0.10.4"
dependencies = [
"anyhow",
"directories",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "remus"
version = "0.10.0"
version = "0.10.4"
edition = "2024"
license = "MIT"
+2
View File
@@ -62,6 +62,8 @@ A bundle does not update itself. To update, install the next version's bundle th
| | F11 | Toggle fullscreen |
| | Ctrl+Q | Quit |
Settings has a Controls page with the same list, drawn with the buttons of the controller in use or the keyboard keys. The controls bar at the bottom shows only what depends on the selection, such as Add to queue on an album or Log out on a server. What works the same everywhere is left to the Controls page. The login screen shows all of its controls, since Settings cannot be reached from there.
With Steam running, remus listens only to Steam's virtual controller, so a pad Steam also exposes does not send every press twice. On a Deck, Steam + X opens the on-screen keyboard for the login and search fields.
## Development
@@ -8,3 +8,4 @@ Terminal=false
Categories=AudioVideo;Audio;Player;
Keywords=music;subsonic;navidrome;player;
StartupNotify=true
StartupWMClass=me.anshorei.Fettleshed.Remus
@@ -20,6 +20,10 @@
</supports>
<content_rating type="oars-1.1"/>
<releases>
<release version="0.10.4" date="2026-11-07"/>
<release version="0.10.3" date="2026-11-07"/>
<release version="0.10.2" date="2026-11-06"/>
<release version="0.10.1" date="2026-11-06"/>
<release version="0.10.0" date="2026-11-06"/>
<release version="0.9.1" date="2026-11-06"/>
<release version="0.9.0" date="2026-11-05"/>
+271 -56
View File
@@ -131,6 +131,8 @@ enum Target {
/// Starts library shuffle.
ShuffleAll,
Setting(Setting),
/// A row of the Controls page, by index into `CONTROL_ROWS`.
ControlRow(usize),
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
@@ -143,8 +145,122 @@ enum Setting {
/// A saved login, by index into `Logins::servers`.
Server(usize),
AddServer,
/// Opens the Controls page.
Controls,
}
/// What a row of the Controls page shows on its right.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
enum Keys {
/// The control's icons, as the controls bar draws them.
Icons(Control),
/// Written out, for controls without icons: on a keyboard, then on a
/// controller. Empty where there is none.
Text(&'static str, &'static str),
}
struct ControlRow {
/// Where it works: the rows are listed in groups, in this order.
group: &'static str,
label: &'static str,
keys: Keys,
}
/// Every control, for the Controls page in Settings. The controls bar shows
/// only what depends on the selection; the rest is learned here.
const CONTROL_ROWS: &[ControlRow] = &[
ControlRow {
group: "Everywhere",
label: "Move",
keys: Keys::Text("Arrow keys", "D-pad or left stick"),
},
ControlRow {
group: "Everywhere",
label: "Select",
keys: Keys::Icons(Control::Activate),
},
ControlRow {
group: "Everywhere",
label: "Back",
keys: Keys::Icons(Control::Back),
},
ControlRow {
group: "Everywhere",
label: "Play / pause",
keys: Keys::Icons(Control::PlayPause),
},
ControlRow {
group: "Everywhere",
label: "Skip track",
keys: Keys::Icons(Control::Skip),
},
ControlRow {
group: "Everywhere",
label: "Seek 10 s",
keys: Keys::Text(", / .", "Right stick left / right"),
},
ControlRow {
group: "Everywhere",
label: "Volume",
keys: Keys::Icons(Control::Volume),
},
ControlRow {
group: "Everywhere",
label: "Mute",
keys: Keys::Icons(Control::Mute),
},
ControlRow {
group: "Everywhere",
label: "Now playing",
keys: Keys::Icons(Control::NowPlaying),
},
ControlRow {
group: "Everywhere",
label: "Search",
keys: Keys::Icons(Control::Search),
},
ControlRow {
group: "Browsing",
label: "Sections",
keys: Keys::Icons(Control::Sections),
},
ControlRow {
group: "Browsing",
label: "Add to queue",
keys: Keys::Icons(Control::Queue),
},
ControlRow {
group: "Browsing",
label: "Shuffle play",
keys: Keys::Icons(Control::ShufflePlay),
},
ControlRow {
group: "Now playing",
label: "Seek",
keys: Keys::Icons(Control::Seek),
},
ControlRow {
group: "Now playing",
label: "Shuffle mode",
keys: Keys::Icons(Control::Shuffle),
},
ControlRow {
group: "Text fields",
label: "Steam keyboard",
keys: Keys::Icons(Control::OnScreenKeyboard),
},
ControlRow {
group: "Window",
label: "Fullscreen",
keys: Keys::Text("F11", ""),
},
ControlRow {
group: "Window",
label: "Quit",
keys: Keys::Text("Ctrl + Q", ""),
},
];
/// What the server prompt in Settings offers.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
enum Choice {
@@ -212,6 +328,8 @@ struct HeaderInfo {
#[derive(Clone, Debug)]
enum Source {
Section(Section),
/// The Controls page, opened from Settings.
Controls,
Album(String),
Artist(String),
Playlist(String),
@@ -584,15 +702,15 @@ impl App {
self.set_area(area);
}
/// 0 to 2 are the fields and 3 and 4 the buttons. Below 0 are the saved
/// servers in the card beside the form, from the top one at -n to the
/// bottom one at -1, so Up from the address field reaches the list.
/// Top to bottom: the saved servers in the card beside the form, from
/// -n-1 to -2; the X in the form's corner at -1; the fields 0 to 2; and
/// Connect at 3. So Up from the address field reaches the X, then the list.
fn set_login_focus(&mut self, i: i32) {
let known = self.logins.servers.len() as i32;
self.login_focus = i.clamp(-known, 4);
self.login_focus = i.clamp(-known - 1, 3);
self.ui.set_login_focus(self.login_focus);
self.ui.set_login_known_selected(if self.login_focus < 0 {
known + self.login_focus
self.ui.set_login_known_selected(if self.login_focus < -1 {
known + 1 + self.login_focus
} else {
-1
});
@@ -606,16 +724,16 @@ impl App {
Action::Down | Action::SectionNext => self.set_login_focus(self.login_focus + 1),
// Across to the saved servers and back. A text field keeps Left
// and Right on a keyboard for its cursor.
Action::Left if self.login_focus >= 0 && !self.logins.servers.is_empty() => {
self.set_login_focus(-(self.logins.servers.len() as i32))
Action::Left if self.login_focus >= -1 && !self.logins.servers.is_empty() => {
self.set_login_focus(-(self.logins.servers.len() as i32) - 1)
}
Action::Right if self.login_focus < 0 => self.set_login_focus(0),
Action::Activate if self.login_focus < 0 => {
self.pick_known((self.logins.servers.len() as i32 + self.login_focus) as usize)
Action::Right if self.login_focus < -1 => self.set_login_focus(0),
Action::Activate if self.login_focus < -1 => {
self.pick_known((self.logins.servers.len() as i32 + 1 + self.login_focus) as usize)
}
Action::Activate if self.login_focus == -1 && self.client.is_some() => self.cancel_login(),
Action::Activate if self.login_focus == -1 => self.action(Action::Quit),
Action::Activate if self.login_focus < 2 => self.set_login_focus(self.login_focus + 1),
Action::Activate if self.login_focus == 4 && self.client.is_some() => self.cancel_login(),
Action::Activate if self.login_focus == 4 => self.action(Action::Quit),
Action::Activate => self.login_submit(),
Action::Back => self.cancel_login(),
// The face button that queues elsewhere; a keyboard types into
@@ -704,19 +822,7 @@ impl App {
fn switch_server(&mut self, client: Client) {
if self.client.is_some() {
self.save_queue();
self.stop_player();
self.clear_queue();
self.queue_sel = 0;
self.position = 0.0;
self.duration = 0.0;
self.paused = false;
self.held = false;
self.scrobbled = false;
self.now_playing_due = false;
self.restoring = None;
self.art_shown = None;
self.flip_timer.stop();
self.ui.set_np_flip_out(false);
self.reset_playback();
}
log::info!("browsing {} on {}", client.user(), client.base());
self.enter_browse(client);
@@ -725,6 +831,30 @@ impl App {
self.sync_inhibit();
}
/// Stops the player and empties the queue with everything kept about it,
/// so the next server starts clean. The player's own events would
/// otherwise update the screen and the screensaver inhibit, but
/// stop_player drops them, so both are done here.
fn reset_playback(&mut self) {
self.stop_player();
self.clear_queue();
self.queue_sel = 0;
self.position = 0.0;
self.duration = 0.0;
self.paused = false;
self.held = false;
self.scrobbled = false;
self.now_playing_due = false;
self.restoring = None;
self.art_shown = None;
self.art_waiting = false;
self.flip_timer.stop();
self.ui.set_np_flip_out(false);
self.render_player();
self.sync_queue(true);
self.sync_inhibit();
}
fn clear_queue(&mut self) {
self.queue.clear();
self.order.clear();
@@ -910,11 +1040,9 @@ impl App {
if keep_queue {
self.save_queue();
}
self.stop_player();
self.clear_queue();
self.reset_playback();
self.client = None;
self.checking_login = false;
self.render_player();
}
/// The server turned down the saved login of the browsed server: log it
@@ -989,6 +1117,13 @@ impl App {
if prompts != self.prompts {
self.prompts = prompts;
self.render_hints();
// Its rows show the buttons of the input in use.
if self
.current_page()
.is_some_and(|p| matches!(p.source, Source::Controls))
{
self.sync_items(true);
}
}
}
@@ -1396,6 +1531,7 @@ impl App {
}
Target::ShuffleAll => self.start_library_shuffle(),
Target::Setting(s) => self.toggle_setting(s),
Target::ControlRow(_) => {}
}
}
@@ -1424,12 +1560,22 @@ impl App {
Setting::ShowHintBar => self.settings.show_hint_bar = !self.settings.show_hint_bar,
Setting::Server(i) => return self.select_server(i),
Setting::AddServer => return self.add_server(),
Setting::Controls => return self.open_controls(),
// A range: left and right change it, confirm does nothing.
Setting::CoverBackdrop | Setting::Version => return,
}
self.settings_changed();
}
/// The Controls page, on top of Settings. No header: it is a list.
fn open_controls(&mut self) {
let page = self.new_page(Source::Controls, "Controls".to_string(), true, None);
let id = page.id;
self.stacks[self.section].push(page);
self.load(id, Source::Controls);
self.render_page();
}
/// Moves a range setting one step up or down.
fn adjust_setting(&mut self, setting: Setting, up: bool) {
match setting {
@@ -1444,7 +1590,8 @@ impl App {
| Setting::ShowHintBar
| Setting::Version
| Setting::Server(_)
| Setting::AddServer => return,
| Setting::AddServer
| Setting::Controls => return,
}
self.settings_changed();
}
@@ -1650,6 +1797,10 @@ impl App {
self.page_loaded(page_id, Ok(data), true);
return;
}
if matches!(source, Source::Controls) {
self.page_loaded(page_id, Ok(controls_data()), true);
return;
}
let Some(client) = self.client.clone() else { return };
match source {
Source::Section(Section::Recent) => self.spawn(
@@ -1703,7 +1854,7 @@ impl App {
async move { Ok(playlists_data(client.playlists().await?)) },
move |app, r| app.page_loaded(page_id, r, true),
),
Source::Section(Section::Search | Section::Settings) => {}
Source::Section(Section::Search | Section::Settings) | Source::Controls => {}
Source::Search(q) => self.spawn(
async move { Ok(search_data(client.search(&q).await?)) },
move |app, r| app.page_loaded(page_id, r, true),
@@ -2002,13 +2153,17 @@ impl App {
Target::Setting(Setting::CoverBackdrop) => Some(self.settings.cover_backdrop as f32 / 100.0),
_ => None,
};
let (icons, detail) = match entry.target {
Target::ControlRow(i) => self.control_keys(&CONTROL_ROWS[i]),
_ => (Vec::new(), entry.detail),
};
Some(Item {
index: index as i32,
letter: initial(&entry.title).into(),
tint: tint(&entry.title),
title: entry.title.into(),
subtitle: entry.subtitle.into(),
detail: entry.detail.into(),
detail: detail.into(),
number: entry.number.into(),
has_cover: cover.is_some(),
cover: cover.unwrap_or_default(),
@@ -2017,9 +2172,26 @@ impl App {
playing,
slider: level.is_some(),
level: level.unwrap_or_default(),
icons: ModelRc::new(VecModel::from(icons)),
})
}
/// A Controls row's icons for the input in use, or its keys written out,
/// or which input it needs when this one has nothing for it.
fn control_keys(&self, row: &ControlRow) -> (Vec<Image>, String) {
let keyboard = self.prompts == Prompts::Keyboard;
let (icons, text) = match row.keys {
Keys::Icons(c) => (self.hint_icons(c), ""),
Keys::Text(k, p) => (Vec::new(), if keyboard { k } else { p }),
};
let text = match text {
"" if icons.is_empty() && keyboard => "Controller only",
"" if icons.is_empty() => "Keyboard only",
t => t,
};
(icons, text.to_string())
}
fn render_shuffle(&self) {
let label = match self.shuffle {
_ if self.library.is_some() => "Shuffling the whole library",
@@ -2051,10 +2223,10 @@ impl App {
Screen::Login => {
let adding = self.client.is_some();
let label = match self.login_focus {
..0 => "Use this server",
..-1 => "Use this server",
-1 if adding => "Cancel",
-1 => "Exit",
0 | 1 => "Next",
4 if adding => "Cancel",
4 => "Exit",
_ => "Connect",
};
h(Control::Activate, label);
@@ -2062,20 +2234,18 @@ impl App {
let shown = self.ui.get_login_password_shown();
h(Control::Queue, if shown { "Hide password" } else { "Show password" });
}
if adding {
// Already the activate hint while the X has focus.
if adding && self.login_focus != -1 {
h(Control::Back, "Cancel");
}
}
Screen::Browse => match self.area {
Area::Sidebar => {
h(Control::Activate, "Open");
h(Control::PlayPause, "Play / Pause");
h(Control::Search, "Search");
h(Control::NowPlaying, "Now playing");
}
// What works the same everywhere (Back, Play / Pause,
// Sections, Now playing, Search, and Activate where it opens)
// is on the Controls page in Settings instead.
Area::Sidebar => {}
Area::Search => {
h(Control::Activate, "Search");
h(Control::Back, "Back");
h(Control::OnScreenKeyboard, "Keyboard");
}
_ => {
@@ -2100,14 +2270,14 @@ impl App {
}
}
Some(Target::Setting(Setting::AddServer)) => h(Control::Activate, "Add"),
Some(Target::Setting(Setting::Controls)) => {}
Some(Target::Setting(_)) => h(Control::Activate, "Change"),
Some(_) => h(Control::Activate, "Open"),
Some(_) => {}
None if self.current_page().is_some_and(|p| p.error.is_some()) => {
h(Control::Activate, "Try again")
}
None => {}
}
h(Control::Back, "Back");
if matches!(target, Some(Target::Song(_) | Target::Album(_) | Target::Playlist(_))) {
h(Control::Queue, "Add to queue");
}
@@ -2123,16 +2293,10 @@ impl App {
},
);
}
h(Control::PlayPause, "Play / Pause");
h(Control::Sections, "Sections");
h(Control::NowPlaying, "Now playing");
}
},
Screen::NowPlaying => {
h(Control::Activate, "Play selected");
h(Control::Back, "Back");
h(Control::PlayPause, "Play / Pause");
h(Control::Skip, "Skip");
h(
Control::Shuffle,
match self.shuffle {
@@ -2142,9 +2306,6 @@ impl App {
Mode::Albums => "Shuffle: albums",
},
);
h(Control::Seek, "Seek");
h(Control::Volume, "Volume");
h(Control::Mute, "Mute");
}
}
self.ui.set_hints(ModelRc::new(VecModel::from(hints)));
@@ -2451,7 +2612,7 @@ impl App {
Ok(songs) => app.shuffle_play(songs),
Err(e) => failed(app, e),
}),
Target::ShuffleAll | Target::Setting(_) => {}
Target::ShuffleAll | Target::Setting(_) | Target::ControlRow(_) => {}
}
}
@@ -2499,7 +2660,7 @@ impl App {
)
}
Target::Artist(_) => self.toast("Open the artist to queue one of their albums".into()),
Target::ShuffleAll | Target::Setting(_) => {}
Target::ShuffleAll | Target::Setting(_) | Target::ControlRow(_) => {}
}
}
@@ -3128,6 +3289,7 @@ impl App {
playing: Some(index) == self.current,
slider: false,
level: 0.0,
icons: ModelRc::default(),
}
}
}
@@ -3286,6 +3448,16 @@ fn settings_data(s: &Settings, logins: &Logins) -> PageData {
show_art: false,
target: Target::Setting(Setting::ShowHintBar),
},
Entry {
title: "Controls".to_string(),
subtitle: "Every button and key, for the controller in use or the keyboard".to_string(),
detail: String::new(),
number: String::new(),
cover: None,
round: false,
show_art: false,
target: Target::Setting(Setting::Controls),
},
],
..Default::default()
};
@@ -3307,6 +3479,31 @@ fn settings_data(s: &Settings, logins: &Logins) -> PageData {
data
}
fn controls_data() -> PageData {
PageData {
entries: CONTROL_ROWS
.iter()
.enumerate()
.map(|(i, row)| Entry {
title: row.label.to_string(),
// The one control that is a long press on a controller.
subtitle: if row.keys == Keys::Icons(Control::ShufflePlay) {
format!("{}, hold on a controller", row.group)
} else {
row.group.to_string()
},
detail: String::new(),
number: String::new(),
cover: None,
round: false,
show_art: false,
target: Target::ControlRow(i),
})
.collect(),
..Default::default()
}
}
/// One step of the volume, kept within 0 to 100.
fn step_volume(v: u8, up: bool) -> u8 {
let v = v.min(100);
@@ -3595,6 +3792,24 @@ mod tests {
assert!(has_version(false));
}
#[test]
fn the_controls_page_lists_every_control_in_groups() {
for control in Control::ALL {
assert!(
CONTROL_ROWS.iter().any(|r| r.keys == Keys::Icons(control)),
"{control:?} is missing"
);
}
// Each group in one run, so the page reads as groups.
let mut seen: Vec<&str> = Vec::new();
for row in CONTROL_ROWS {
if seen.last() != Some(&row.group) {
assert!(!seen.contains(&row.group), "{} is split", row.group);
seen.push(row.group);
}
}
}
#[test]
fn volume_steps_stay_in_range() {
assert_eq!(step_volume(50, true), 55);
+7
View File
@@ -15,6 +15,9 @@ mod subsonic;
use std::time::Duration;
/// The Flatpak app id, which is also the name of the desktop file.
const APP_ID: &str = "me.anshorei.Fettleshed.Remus";
fn main() -> anyhow::Result<()> {
env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("remus=info")).init();
@@ -27,6 +30,10 @@ fn main() -> anyhow::Result<()> {
.build()?;
let ui = AppWindow::new()?;
// Docks match the window to the desktop file by this id, on Wayland as
// the app id and on X11 as the WM_CLASS. It needs the platform that
// AppWindow::new sets up, and has to be set before the window is shown.
slint::set_xdg_app_id(APP_ID)?;
ui.set_version(env!("CARGO_PKG_VERSION").into());
app::install(&ui, rt.handle().clone());
// The controller is read from the device, whichever window is in front, so
+41 -16
View File
@@ -31,6 +31,8 @@ export struct Item {
// A setting with a range: draws `level` (0 to 1) as a slider before `detail`.
slider: bool,
level: float,
// Button or key icons after `detail`, on the Controls page.
icons: [image],
}
export struct Header {
@@ -280,6 +282,19 @@ component Row inherits Rectangle {
horizontal-alignment: right;
vertical-alignment: center;
}
if root.item.icons.length > 0: HorizontalLayout {
spacing: 4px * Theme.s;
for icon in root.item.icons: VerticalLayout {
alignment: center;
Image {
source: icon;
height: 34px * Theme.s;
// Keys such as Space are wider than a button.
width: self.height * icon.width / max(1, icon.height);
}
}
}
}
TouchArea {
@@ -1101,21 +1116,6 @@ component LoginView inherits Rectangle {
clicked => { root.submit(); }
}
}
// Secondary to Connect: outlined, no fill, and only lit when focused.
Rectangle {
height: 46px * Theme.s;
border-radius: 12px * Theme.s;
border-width: 2px * Theme.s;
border-color: root.focus-index == 4 ? Theme.focus : Theme.line;
Text {
text: root.can-cancel ? "Cancel" : "Exit";
font-size: 17px * Theme.s;
color: root.focus-index == 4 ? Theme.text : Theme.muted;
}
TouchArea {
clicked => { root.exit(); }
}
}
if root.error != "": Text {
text: root.error;
font-size: 15px * Theme.s;
@@ -1129,6 +1129,31 @@ component LoginView inherits Rectangle {
wrap: word-wrap;
}
}
// Exit, or Cancel when adding a server from inside the app. A
// corner button rather than a row, to keep the card short.
Rectangle {
x: parent.width - self.width - 14px * Theme.s;
y: 14px * Theme.s;
width: 44px * Theme.s;
height: 44px * Theme.s;
border-radius: self.width / 2;
background: root.focus-index == -1 || x-area.has-hover ? Theme.raised : transparent;
border-width: 2px * Theme.s;
border-color: root.focus-index == -1 ? Theme.focus : transparent;
Path {
width: 18px * Theme.s;
height: 18px * Theme.s;
viewbox-width: 24;
viewbox-height: 24;
commands: "M 4 4 L 20 20 M 20 4 L 4 20";
stroke: root.focus-index == -1 || x-area.has-hover ? Theme.text : Theme.muted;
stroke-width: 2px * Theme.s;
}
x-area := TouchArea {
clicked => { root.exit(); }
}
}
}
}
}
@@ -1419,7 +1444,7 @@ export component AppWindow inherits Window {
search.focus-input();
}
public function focus-login(i: int) {
// Below 0 is a saved server, above 2 a button: keys go to the scope.
// Below 0 is the X or a saved server, 3 is Connect: keys go to the scope.
if (i >= 3 || i < 0) {
fs.focus();
} else {