diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c7f80a..c4d9de3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ One section per version, newest first. +## 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 diff --git a/Cargo.lock b/Cargo.lock index b4bd28c..acb5154 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4385,7 +4385,7 @@ checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" [[package]] name = "remus" -version = "0.6.6" +version = "0.6.7" dependencies = [ "anyhow", "directories", diff --git a/Cargo.toml b/Cargo.toml index 24ec859..976794b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "remus" -version = "0.6.6" +version = "0.6.7" edition = "2024" license = "MIT" diff --git a/flatpak/me.anshorei.Fettleshed.Remus.metainfo.xml b/flatpak/me.anshorei.Fettleshed.Remus.metainfo.xml index 8fbdfe7..7af9bde 100644 --- a/flatpak/me.anshorei.Fettleshed.Remus.metainfo.xml +++ b/flatpak/me.anshorei.Fettleshed.Remus.metainfo.xml @@ -20,6 +20,7 @@ + diff --git a/ui/app.slint b/ui/app.slint index 945a57f..fd32ec9 100644 --- a/ui/app.slint +++ b/ui/app.slint @@ -567,6 +567,49 @@ component Speaker { } } +// A quiet speaker, bar and number for the current volume. +component VolumeLevel inherits HorizontalLayout { + in property level; + in property muted; + in property 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 shown; @@ -633,6 +676,8 @@ component NowBar inherits Rectangle { in property progress; in property time; in property paused; + in property volume; + in property 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; } } } @@ -1374,6 +1400,8 @@ 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 {