Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ab42814302 | ||
|
|
a5d51cf044 |
@@ -2,6 +2,18 @@
|
||||
|
||||
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
|
||||
|
||||
- The volume level sits centred under the progress bar on the now-playing screen, and at the right of the bar at the bottom of the other screens, next to the time.
|
||||
|
||||
## v0.6.6 (2026-11-04)
|
||||
|
||||
### Features
|
||||
|
||||
Generated
+1
-1
@@ -4385,7 +4385,7 @@ checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
|
||||
|
||||
[[package]]
|
||||
name = "remus"
|
||||
version = "0.6.6"
|
||||
version = "0.6.8"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"directories",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "remus"
|
||||
version = "0.6.6"
|
||||
version = "0.6.8"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
</supports>
|
||||
<content_rating type="oars-1.1"/>
|
||||
<releases>
|
||||
<release version="0.6.8" date="2026-11-04"/>
|
||||
<release version="0.6.7" date="2026-11-04"/>
|
||||
<release version="0.6.6" date="2026-11-04"/>
|
||||
<release version="0.6.5" date="2026-11-04"/>
|
||||
<release version="0.6.4" date="2026-11-04"/>
|
||||
|
||||
+51
-4
@@ -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<SharedString> = 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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
+61
-30
@@ -567,6 +567,49 @@ component Speaker {
|
||||
}
|
||||
}
|
||||
|
||||
// A quiet speaker, bar and number for the current volume.
|
||||
component VolumeLevel inherits HorizontalLayout {
|
||||
in property <int> level;
|
||||
in property <bool> muted;
|
||||
in property <length> font-size: 13px * Theme.s;
|
||||
spacing: 10px * Theme.s;
|
||||
// Its own width only, so a stretching row does not hand it the slack.
|
||||
horizontal-stretch: 0;
|
||||
|
||||
VerticalLayout {
|
||||
alignment: center;
|
||||
Speaker {
|
||||
muted: root.muted || root.level == 0;
|
||||
tint: Theme.muted;
|
||||
size: 14px * Theme.s;
|
||||
}
|
||||
}
|
||||
VerticalLayout {
|
||||
alignment: center;
|
||||
Rectangle {
|
||||
width: 90px * Theme.s;
|
||||
height: 4px * Theme.s;
|
||||
border-radius: 2px * Theme.s;
|
||||
background: Theme.raised;
|
||||
Rectangle {
|
||||
x: 0;
|
||||
width: parent.width * (root.muted ? 0 : root.level / 100);
|
||||
border-radius: 2px * Theme.s;
|
||||
background: Theme.muted;
|
||||
}
|
||||
}
|
||||
}
|
||||
Text {
|
||||
// Fixed, so the bar does not shift as the number changes, and wide
|
||||
// enough for "Muted".
|
||||
width: 4.2 * root.font-size;
|
||||
text: root.muted ? "Muted" : root.level;
|
||||
font-size: root.font-size;
|
||||
color: Theme.muted;
|
||||
vertical-alignment: center;
|
||||
}
|
||||
}
|
||||
|
||||
// The level after a volume change, faded out again by the app after a moment.
|
||||
component VolumeOverlay inherits Rectangle {
|
||||
in property <bool> shown;
|
||||
@@ -633,6 +676,8 @@ component NowBar inherits Rectangle {
|
||||
in property <float> progress;
|
||||
in property <string> time;
|
||||
in property <bool> paused;
|
||||
in property <int> volume;
|
||||
in property <bool> muted;
|
||||
|
||||
background: Theme.panel;
|
||||
|
||||
@@ -699,6 +744,12 @@ component NowBar inherits Rectangle {
|
||||
size: 15px * Theme.s;
|
||||
}
|
||||
}
|
||||
if root.has-track: Rectangle { width: 6px * Theme.s; }
|
||||
if root.has-track: VolumeLevel {
|
||||
level: root.volume;
|
||||
muted: root.muted;
|
||||
font-size: 15px * Theme.s;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1017,35 +1068,10 @@ component NowPlayingView inherits Rectangle {
|
||||
}
|
||||
}
|
||||
HorizontalLayout {
|
||||
spacing: 10px * Theme.s;
|
||||
alignment: start;
|
||||
VerticalLayout {
|
||||
alignment: center;
|
||||
Speaker {
|
||||
muted: root.muted || root.volume == 0;
|
||||
tint: Theme.muted;
|
||||
size: 14px * Theme.s;
|
||||
}
|
||||
}
|
||||
VerticalLayout {
|
||||
alignment: center;
|
||||
Rectangle {
|
||||
width: 90px * Theme.s;
|
||||
height: 4px * Theme.s;
|
||||
border-radius: 2px * Theme.s;
|
||||
background: Theme.raised;
|
||||
Rectangle {
|
||||
x: 0;
|
||||
width: parent.width * (root.muted ? 0 : root.volume / 100);
|
||||
border-radius: 2px * Theme.s;
|
||||
background: Theme.muted;
|
||||
}
|
||||
}
|
||||
}
|
||||
Text {
|
||||
text: root.muted ? "Muted" : root.volume;
|
||||
font-size: 13px * Theme.s;
|
||||
color: Theme.muted;
|
||||
alignment: center;
|
||||
VolumeLevel {
|
||||
level: root.volume;
|
||||
muted: root.muted;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1165,6 +1191,7 @@ export component AppWindow inherits Window {
|
||||
in property <int> volume;
|
||||
in property <bool> muted;
|
||||
in property <string> version;
|
||||
in property <bool> show-hint-bar: true;
|
||||
|
||||
public function focus-main() {
|
||||
fs.focus();
|
||||
@@ -1374,9 +1401,13 @@ export component AppWindow inherits Window {
|
||||
progress: root.np-progress;
|
||||
time: root.np-position + " / " + root.np-duration;
|
||||
paused: root.np-paused;
|
||||
volume: root.volume;
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user