feat: add a setting to hide the controls bar

Settings has a Show controls bar toggle, on by default and saved as
show_hint_bar. Off, the hint bar goes from the browse and now-playing
screens and the content takes its height. The login screen keeps it,
since the controls are not known yet there and Settings is out of reach.

The bar is where the version shows, so while it is off Settings lists
the version instead.
This commit is contained in:
Ansho Rei
2026-11-04 17:18:16 +01:00
parent a5d51cf044
commit ab42814302
7 changed files with 71 additions and 7 deletions
+7
View File
@@ -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);