diff --git a/CHANGELOG.md b/CHANGELOG.md index c4d9de3..4d07ab8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ One section per version, newest first. +## v0.6.8 (2026-11-04) + +### Features + +- Settings has a Show controls bar toggle. Turned off, the bar with the button hints and the version is hidden on the browse and now-playing screens, and Settings lists the version instead. The login screen always shows it. + ## v0.6.7 (2026-11-04) ### Bug fixes diff --git a/Cargo.lock b/Cargo.lock index acb5154..dd55668 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4385,7 +4385,7 @@ checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" [[package]] name = "remus" -version = "0.6.7" +version = "0.6.8" dependencies = [ "anyhow", "directories", diff --git a/Cargo.toml b/Cargo.toml index 976794b..0d9dee7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "remus" -version = "0.6.7" +version = "0.6.8" edition = "2024" license = "MIT" diff --git a/flatpak/me.anshorei.Fettleshed.Remus.metainfo.xml b/flatpak/me.anshorei.Fettleshed.Remus.metainfo.xml index 7af9bde..fbfaf5b 100644 --- a/flatpak/me.anshorei.Fettleshed.Remus.metainfo.xml +++ b/flatpak/me.anshorei.Fettleshed.Remus.metainfo.xml @@ -20,6 +20,7 @@ + diff --git a/src/app.rs b/src/app.rs index 4ec6b81..986c376 100644 --- a/src/app.rs +++ b/src/app.rs @@ -117,7 +117,7 @@ impl Section { } } -#[derive(Clone, Debug)] +#[derive(Clone, Debug, PartialEq)] enum Target { Album(String), Artist(String), @@ -131,6 +131,9 @@ enum Target { enum Setting { AlbumArtColours, CoverBackdrop, + ShowHintBar, + /// The version, listed while the hint bar that normally shows it is off. + Version, } /// How long the UI takes to change from one palette to the next. @@ -352,6 +355,7 @@ impl App { fn start(&mut self) { self.render_backdrop(); + self.ui.set_show_hint_bar(self.settings.show_hint_bar); let labels: Vec = SECTIONS.iter().map(|s| s.label().into()).collect(); self.ui.set_sections(ModelRc::new(VecModel::from(labels))); @@ -913,8 +917,9 @@ impl App { fn toggle_setting(&mut self, setting: Setting) { match setting { Setting::AlbumArtColours => self.settings.album_art_colours = !self.settings.album_art_colours, + Setting::ShowHintBar => self.settings.show_hint_bar = !self.settings.show_hint_bar, // A range: left and right change it, confirm does nothing. - Setting::CoverBackdrop => return, + Setting::CoverBackdrop | Setting::Version => return, } self.settings_changed(); } @@ -929,7 +934,7 @@ impl App { } self.settings.cover_backdrop = v; } - Setting::AlbumArtColours => return, + Setting::AlbumArtColours | Setting::ShowHintBar | Setting::Version => return, } self.settings_changed(); } @@ -948,6 +953,7 @@ impl App { } } self.render_backdrop(); + self.ui.set_show_hint_bar(self.settings.show_hint_bar); self.update_theme(); } @@ -1476,6 +1482,7 @@ impl App { match target { Some(Target::Song(_)) => h(Control::Activate, "Play"), Some(Target::Setting(Setting::CoverBackdrop)) => h(Control::Seek, "Adjust"), + Some(Target::Setting(Setting::Version)) => {} Some(Target::Setting(_)) => h(Control::Activate, "Change"), Some(_) => h(Control::Activate, "Open"), None if self.current_page().is_some_and(|p| p.error.is_some()) => { @@ -2222,7 +2229,7 @@ fn song_entry(s: &Song, index: usize) -> Entry { fn settings_data(s: &Settings) -> PageData { let on_off = |on: bool| if on { "On" } else { "Off" }.to_string(); - PageData { + let mut data = PageData { entries: vec![ Entry { title: "Colours from album art".to_string(), @@ -2248,9 +2255,33 @@ fn settings_data(s: &Settings) -> PageData { show_art: false, target: Target::Setting(Setting::CoverBackdrop), }, + Entry { + title: "Show controls bar".to_string(), + subtitle: "The buttons for each screen and the version, at the bottom".to_string(), + detail: on_off(s.show_hint_bar), + number: String::new(), + cover: None, + round: false, + show_art: false, + target: Target::Setting(Setting::ShowHintBar), + }, ], ..Default::default() + }; + // The bar is where the version normally shows. + if !s.show_hint_bar { + data.entries.push(Entry { + title: "Version".to_string(), + subtitle: String::new(), + detail: concat!("remus ", env!("CARGO_PKG_VERSION")).to_string(), + number: String::new(), + cover: None, + round: false, + show_art: false, + target: Target::Setting(Setting::Version), + }); } + data } /// One step of the volume, kept within 0 to 100. @@ -2474,6 +2505,22 @@ mod tests { assert_ne!(a, c); } + #[test] + fn version_is_listed_in_settings_only_while_the_bar_is_hidden() { + let has_version = |show_hint_bar: bool| { + let s = Settings { + show_hint_bar, + ..Settings::default() + }; + settings_data(&s) + .entries + .iter() + .any(|e| e.target == Target::Setting(Setting::Version)) + }; + assert!(!has_version(true)); + assert!(has_version(false)); + } + #[test] fn volume_steps_stay_in_range() { assert_eq!(step_volume(50, true), 55); diff --git a/src/config.rs b/src/config.rs index feb2f31..15581de 100644 --- a/src/config.rs +++ b/src/config.rs @@ -99,6 +99,9 @@ pub struct Settings { pub volume: u8, /// Muted, keeping `volume` for when it is unmuted. pub muted: bool, + /// The bar with the button hints and the version. The login screen shows + /// it regardless. + pub show_hint_bar: bool, } /// The cover backdrop strength that looks like it did before it was a setting. @@ -111,6 +114,7 @@ impl Default for Settings { cover_backdrop: COVER_BACKDROP_DEFAULT, volume: 100, muted: false, + show_hint_bar: true, } } } @@ -216,6 +220,7 @@ mod tests { assert_eq!(s.cover_backdrop, COVER_BACKDROP_DEFAULT); assert_eq!(s.volume, 100); assert!(!s.muted); + assert!(s.show_hint_bar); } #[test] @@ -223,6 +228,7 @@ mod tests { let s: Settings = toml::from_str("album_art_colours = true\n").unwrap(); assert!(s.album_art_colours); assert_eq!(s.cover_backdrop, COVER_BACKDROP_DEFAULT); + assert!(s.show_hint_bar); } #[test] @@ -232,6 +238,7 @@ mod tests { cover_backdrop: 70, volume: 35, muted: true, + show_hint_bar: false, }; let back: Settings = toml::from_str(&toml::to_string(&s).unwrap()).unwrap(); assert_eq!(back, s); diff --git a/ui/app.slint b/ui/app.slint index fd32ec9..1988b7a 100644 --- a/ui/app.slint +++ b/ui/app.slint @@ -1191,6 +1191,7 @@ export component AppWindow inherits Window { in property volume; in property muted; in property version; + in property show-hint-bar: true; public function focus-main() { fs.focus(); @@ -1404,7 +1405,9 @@ export component AppWindow inherits Window { muted: root.muted; } - HintBar { + // Optional, except on the login screen, where the controls are + // not known yet and Settings cannot be reached. + if root.show-hint-bar || root.screen == Screen.login: HintBar { height: 46px * Theme.s; hints: root.hints; version: root.version;