Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0e7c63c09a | ||
|
|
5e1e120457 | ||
|
|
9be6f86557 | ||
|
|
341ae614e1 | ||
|
|
2e8b2e6a02 |
@@ -1 +1,2 @@
|
||||
/target
|
||||
/.scratch
|
||||
|
||||
@@ -2,6 +2,30 @@
|
||||
|
||||
One section per version, newest first.
|
||||
|
||||
## v0.6.6 (2026-11-04)
|
||||
|
||||
### Features
|
||||
|
||||
- Volume control for remus's own playback, leaving the system volume alone. Right stick up and down changes it and clicking the right stick mutes; on a keyboard, + and - change it and m mutes. A level shows briefly after each change, the now-playing screen shows it under the times, and it is kept across restarts.
|
||||
|
||||
## v0.6.5 (2026-11-04)
|
||||
|
||||
### Features
|
||||
|
||||
- The now-playing screen shows a play or pause icon under the progress bar instead of the words Playing and Paused. The mini player uses the same icons, which no longer depend on the font.
|
||||
|
||||
## v0.6.4 (2026-11-04)
|
||||
|
||||
### Features
|
||||
|
||||
- Settings has a Cover backdrop slider for how much of the cover shows behind the now-playing screen, from off to 100 in steps of 10. Left and right change it. The default looks as before, and the strongest setting still keeps the text readable over a bright cover.
|
||||
|
||||
## v0.6.3 (2026-11-04)
|
||||
|
||||
### Features
|
||||
|
||||
- On the now-playing screen the cover flips around when the next track has a different picture, and settles with a small bounce. Tracks that share a picture do not flip, even on servers such as Navidrome that give every track its own cover id.
|
||||
|
||||
## v0.6.2 (2026-11-04)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
@@ -4385,7 +4385,7 @@ checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
|
||||
|
||||
[[package]]
|
||||
name = "remus"
|
||||
version = "0.6.2"
|
||||
version = "0.6.6"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"directories",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "remus"
|
||||
version = "0.6.2"
|
||||
version = "0.6.6"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
|
||||
|
||||
@@ -20,6 +20,10 @@
|
||||
</supports>
|
||||
<content_rating type="oars-1.1"/>
|
||||
<releases>
|
||||
<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"/>
|
||||
<release version="0.6.3" date="2026-11-04"/>
|
||||
<release version="0.6.2" date="2026-11-04"/>
|
||||
<release version="0.6.1" date="2026-11-04"/>
|
||||
<release version="0.6.0" date="2026-11-04"/>
|
||||
|
||||
@@ -45,6 +45,7 @@ modules:
|
||||
- .git
|
||||
- .worklane
|
||||
- .flatpak-builder
|
||||
- .scratch
|
||||
- type: dir
|
||||
path: ../target/flatpak/vendor
|
||||
dest: vendor
|
||||
|
||||
@@ -65,6 +65,12 @@ pub fn shutdown() {
|
||||
let app = APP.with(|cell| cell.borrow_mut().take());
|
||||
if let Some(mut app) = app {
|
||||
app.save_queue();
|
||||
// A volume change made just before quitting is still waiting to save.
|
||||
if app.volume_save_timer.running()
|
||||
&& let Err(e) = config::save_settings(&app.settings)
|
||||
{
|
||||
log::warn!("saving settings: {e:#}");
|
||||
}
|
||||
if let Some(i) = app.inhibitor.take() {
|
||||
i.shutdown();
|
||||
}
|
||||
@@ -124,10 +130,14 @@ enum Target {
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
enum Setting {
|
||||
AlbumArtColours,
|
||||
CoverBackdrop,
|
||||
}
|
||||
|
||||
/// How long the UI takes to change from one palette to the next.
|
||||
const FADE: Duration = Duration::from_millis(800);
|
||||
/// How long the now-playing cover takes to turn edge-on, the `in` animation
|
||||
/// of the `turned` state in NowPlayingView. The turn back is in the .slint.
|
||||
const FLIP_OUT: Duration = Duration::from_millis(170);
|
||||
|
||||
/// The palette on screen and the one it is fading towards.
|
||||
struct Fade {
|
||||
@@ -199,6 +209,8 @@ struct Covers {
|
||||
/// Per cover id, whatever size it was decoded at. None for a cover with
|
||||
/// too little colour to base a palette on.
|
||||
tones: LruCache<String, Option<Tone>>,
|
||||
/// Hash of each decoded cover's pixels, to tell two ids with one picture.
|
||||
prints: LruCache<CoverKey, u64>,
|
||||
pending: HashSet<CoverKey>,
|
||||
failed: HashSet<CoverKey>,
|
||||
limit: Arc<Semaphore>,
|
||||
@@ -241,12 +253,30 @@ pub struct App {
|
||||
last_save: Instant,
|
||||
login_focus: i32,
|
||||
toast_timer: Timer,
|
||||
/// Hides the volume overlay a moment after the last change.
|
||||
volume_timer: Timer,
|
||||
/// Saves the volume once a run of changes is over.
|
||||
volume_save_timer: Timer,
|
||||
/// Keyboard keys or the buttons of the controller used last.
|
||||
prompts: Prompts,
|
||||
/// Decoded hint icons, so a selection move does not parse SVG again.
|
||||
icons: RefCell<HashMap<(Prompts, Control), Vec<Image>>>,
|
||||
settings: Settings,
|
||||
fade: Fade,
|
||||
/// The now-playing art on screen, `None` when nothing is playing.
|
||||
art_shown: Option<ShownArt>,
|
||||
/// Runs while the cover turns away; the new art goes up when it fires.
|
||||
flip_timer: Timer,
|
||||
}
|
||||
|
||||
/// What the now-playing art shows, to decide whether a track change flips it.
|
||||
/// Compared by picture, not by id: Navidrome gives every track its own cover
|
||||
/// id even when the whole album shares one image.
|
||||
struct ShownArt {
|
||||
/// Cover id of the track the art belongs to.
|
||||
id: Option<String>,
|
||||
/// Hash of the decoded cover, `None` for the letter placeholder.
|
||||
print: Option<u64>,
|
||||
}
|
||||
|
||||
impl App {
|
||||
@@ -282,6 +312,7 @@ impl App {
|
||||
covers: Covers {
|
||||
images: LruCache::new(NonZeroUsize::new(400).unwrap()),
|
||||
tones: LruCache::new(NonZeroUsize::new(400).unwrap()),
|
||||
prints: LruCache::new(NonZeroUsize::new(400).unwrap()),
|
||||
pending: HashSet::new(),
|
||||
failed: HashSet::new(),
|
||||
limit: Arc::new(Semaphore::new(6)),
|
||||
@@ -302,6 +333,10 @@ impl App {
|
||||
last_save: Instant::now(),
|
||||
login_focus: 0,
|
||||
toast_timer: Timer::default(),
|
||||
volume_timer: Timer::default(),
|
||||
volume_save_timer: Timer::default(),
|
||||
art_shown: None,
|
||||
flip_timer: Timer::default(),
|
||||
prompts: Prompts::Keyboard,
|
||||
icons: RefCell::default(),
|
||||
settings: config::load_settings(),
|
||||
@@ -316,6 +351,7 @@ impl App {
|
||||
}
|
||||
|
||||
fn start(&mut self) {
|
||||
self.render_backdrop();
|
||||
let labels: Vec<SharedString> = SECTIONS.iter().map(|s| s.label().into()).collect();
|
||||
self.ui.set_sections(ModelRc::new(VecModel::from(labels)));
|
||||
|
||||
@@ -328,6 +364,7 @@ impl App {
|
||||
self.toast(format!("Playback unavailable: {e:#}"));
|
||||
}
|
||||
}
|
||||
self.apply_volume();
|
||||
|
||||
match config::load() {
|
||||
Ok(Some(cfg)) => {
|
||||
@@ -485,6 +522,16 @@ impl App {
|
||||
w.set_fullscreen(!w.is_fullscreen());
|
||||
return;
|
||||
}
|
||||
// Everywhere, the login screen included.
|
||||
Action::VolumeUp | Action::VolumeDown => {
|
||||
self.change_volume(a == Action::VolumeUp);
|
||||
return;
|
||||
}
|
||||
Action::ToggleMute => {
|
||||
self.settings.muted = !self.settings.muted;
|
||||
self.volume_changed();
|
||||
return;
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
match self.screen {
|
||||
@@ -554,6 +601,9 @@ impl App {
|
||||
_ => {}
|
||||
},
|
||||
Area::Content => match a {
|
||||
Action::Left | Action::Right if let Some(s) = self.selected_range_setting() => {
|
||||
self.adjust_setting(s, a == Action::Right)
|
||||
}
|
||||
Action::Up | Action::Down | Action::Left | Action::Right | Action::PageUp | Action::PageDown => {
|
||||
self.move_sel(a)
|
||||
}
|
||||
@@ -849,12 +899,43 @@ impl App {
|
||||
}
|
||||
}
|
||||
|
||||
/// The range setting under the selection, which left and right adjust.
|
||||
fn selected_range_setting(&self) -> Option<Setting> {
|
||||
let page = self.current_page()?;
|
||||
match page.entries.get(page.sel)?.target {
|
||||
Target::Setting(s @ Setting::CoverBackdrop) => Some(s),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------- settings
|
||||
|
||||
fn toggle_setting(&mut self, setting: Setting) {
|
||||
match setting {
|
||||
Setting::AlbumArtColours => self.settings.album_art_colours = !self.settings.album_art_colours,
|
||||
// A range: left and right change it, confirm does nothing.
|
||||
Setting::CoverBackdrop => return,
|
||||
}
|
||||
self.settings_changed();
|
||||
}
|
||||
|
||||
/// Moves a range setting one step up or down.
|
||||
fn adjust_setting(&mut self, setting: Setting, up: bool) {
|
||||
match setting {
|
||||
Setting::CoverBackdrop => {
|
||||
let v = step_backdrop(self.settings.cover_backdrop, up);
|
||||
if v == self.settings.cover_backdrop {
|
||||
return;
|
||||
}
|
||||
self.settings.cover_backdrop = v;
|
||||
}
|
||||
Setting::AlbumArtColours => return,
|
||||
}
|
||||
self.settings_changed();
|
||||
}
|
||||
|
||||
/// Saves the settings and shows what they change.
|
||||
fn settings_changed(&mut self) {
|
||||
if let Err(e) = config::save_settings(&self.settings) {
|
||||
self.toast(format!("Could not save settings: {e:#}"));
|
||||
}
|
||||
@@ -866,9 +947,64 @@ impl App {
|
||||
self.sync_items(true);
|
||||
}
|
||||
}
|
||||
self.render_backdrop();
|
||||
self.update_theme();
|
||||
}
|
||||
|
||||
fn render_backdrop(&self) {
|
||||
let (opacity, left, right) = backdrop_look(self.settings.cover_backdrop);
|
||||
self.ui.set_np_backdrop_opacity(opacity);
|
||||
self.ui.set_np_backdrop_left(left);
|
||||
self.ui.set_np_backdrop_right(right);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------- volume
|
||||
|
||||
fn change_volume(&mut self, up: bool) {
|
||||
let v = step_volume(self.settings.volume, up);
|
||||
// Any change unmutes, as on a phone: turning it up while muted should
|
||||
// be heard.
|
||||
let unmute = self.settings.muted;
|
||||
if v == self.settings.volume && !unmute {
|
||||
self.show_volume();
|
||||
return;
|
||||
}
|
||||
self.settings.volume = v;
|
||||
self.settings.muted = false;
|
||||
self.volume_changed();
|
||||
}
|
||||
|
||||
fn volume_changed(&mut self) {
|
||||
self.apply_volume();
|
||||
self.show_volume();
|
||||
// Saved once the changes stop, not for every step of a held stick.
|
||||
self.volume_save_timer
|
||||
.start(slint::TimerMode::SingleShot, Duration::from_millis(800), || {
|
||||
with_app(|app| {
|
||||
if let Err(e) = config::save_settings(&app.settings) {
|
||||
app.toast(format!("Could not save settings: {e:#}"));
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
fn apply_volume(&self) {
|
||||
if let Some(p) = &self.player {
|
||||
p.set_volume(self.settings.volume);
|
||||
p.set_muted(self.settings.muted);
|
||||
}
|
||||
self.ui.set_volume(self.settings.volume as i32);
|
||||
self.ui.set_muted(self.settings.muted);
|
||||
}
|
||||
|
||||
fn show_volume(&mut self) {
|
||||
self.ui.set_volume_shown(true);
|
||||
self.volume_timer
|
||||
.start(slint::TimerMode::SingleShot, Duration::from_millis(1500), || {
|
||||
with_app(|app| app.ui.set_volume_shown(false))
|
||||
});
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------- theme
|
||||
|
||||
/// The palette the UI should show: from the playing track's cover when
|
||||
@@ -1277,6 +1413,10 @@ impl App {
|
||||
_ => false,
|
||||
};
|
||||
let cover = entry.cover.as_deref().and_then(|id| self.cover(id, px));
|
||||
let level = match entry.target {
|
||||
Target::Setting(Setting::CoverBackdrop) => Some(self.settings.cover_backdrop as f32 / 100.0),
|
||||
_ => None,
|
||||
};
|
||||
Some(Item {
|
||||
index: index as i32,
|
||||
letter: initial(&entry.title).into(),
|
||||
@@ -1290,6 +1430,8 @@ impl App {
|
||||
round: entry.round,
|
||||
show_art: entry.show_art,
|
||||
playing,
|
||||
slider: level.is_some(),
|
||||
level: level.unwrap_or_default(),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1333,6 +1475,7 @@ impl App {
|
||||
.map(|e| &e.target);
|
||||
match target {
|
||||
Some(Target::Song(_)) => h(Control::Activate, "Play"),
|
||||
Some(Target::Setting(Setting::CoverBackdrop)) => h(Control::Seek, "Adjust"),
|
||||
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()) => {
|
||||
@@ -1355,6 +1498,8 @@ impl App {
|
||||
h(Control::PlayPause, "Play / Pause");
|
||||
h(Control::Skip, "Skip");
|
||||
h(Control::Seek, "Seek");
|
||||
h(Control::Volume, "Volume");
|
||||
h(Control::Mute, "Mute");
|
||||
}
|
||||
}
|
||||
self.ui.set_hints(ModelRc::new(VecModel::from(hints)));
|
||||
@@ -1449,11 +1594,12 @@ impl App {
|
||||
None
|
||||
}
|
||||
|
||||
fn cover_loaded(&mut self, key: CoverKey, result: Result<(SharedPixelBuffer<Rgb8Pixel>, Option<Tone>)>) {
|
||||
fn cover_loaded(&mut self, key: CoverKey, result: Result<(SharedPixelBuffer<Rgb8Pixel>, Option<Tone>, u64)>) {
|
||||
self.covers.pending.remove(&key);
|
||||
match result {
|
||||
Ok((buf, tone)) => {
|
||||
Ok((buf, tone, print)) => {
|
||||
self.covers.images.put(key.clone(), Image::from_rgb8(buf));
|
||||
self.covers.prints.put(key.clone(), print);
|
||||
// The first size decoded decides: other sizes give a tone that
|
||||
// differs in the last digits, which would restart the fade.
|
||||
if !self.covers.tones.contains(&key.0) {
|
||||
@@ -1463,7 +1609,16 @@ impl App {
|
||||
}
|
||||
Err(e) => {
|
||||
log::debug!("cover {} failed: {e:#}", key.0);
|
||||
// The playing track's art may be waiting on this to flip.
|
||||
let playing = self
|
||||
.current
|
||||
.and_then(|i| self.queue.get(i))
|
||||
.and_then(|s| s.cover_art.as_deref())
|
||||
== Some(key.0.as_str());
|
||||
self.covers.failed.insert(key);
|
||||
if playing {
|
||||
self.render_player();
|
||||
}
|
||||
// The playing track's cover failing means the brand palette.
|
||||
self.update_theme();
|
||||
return;
|
||||
@@ -1773,18 +1928,16 @@ impl App {
|
||||
self.ui.set_np_paused(self.paused);
|
||||
match song {
|
||||
Some(s) => {
|
||||
let px = self.now_playing_px();
|
||||
let cover = s.cover_art.as_deref().and_then(|id| self.cover(id, px));
|
||||
self.ui
|
||||
.set_np_letter(initial(s.album.as_deref().unwrap_or(&s.title)).into());
|
||||
self.ui.set_np_tint(tint(s.album.as_deref().unwrap_or(&s.title)));
|
||||
self.ui.set_np_has_cover(cover.is_some());
|
||||
self.ui.set_np_cover(cover.unwrap_or_default());
|
||||
self.update_art(&s);
|
||||
self.prefetch_next_cover();
|
||||
self.ui.set_np_title(s.title.into());
|
||||
self.ui.set_np_artist(s.artist.unwrap_or_default().into());
|
||||
self.ui.set_np_album(s.album.unwrap_or_default().into());
|
||||
}
|
||||
None => {
|
||||
self.flip_timer.stop();
|
||||
self.ui.set_np_flip_out(false);
|
||||
self.art_shown = None;
|
||||
self.ui.set_np_has_cover(false);
|
||||
self.ui.set_np_cover(Image::default());
|
||||
self.ui.set_np_letter("".into());
|
||||
@@ -1797,6 +1950,94 @@ impl App {
|
||||
self.update_theme();
|
||||
}
|
||||
|
||||
/// Shows the song's art, flipping the cover if it is a different picture
|
||||
/// from the one on screen. While a changed track's cover loads, the old one
|
||||
/// stays up: the load ends in a render either way, and decides then.
|
||||
fn update_art(&mut self, s: &Song) {
|
||||
if self.flip_timer.running() {
|
||||
// Mid-turn: the midpoint puts up whatever is current then.
|
||||
return;
|
||||
}
|
||||
let Some(shown) = &self.art_shown else {
|
||||
// From nothing playing: no flip, the cover fades in when it loads.
|
||||
self.render_art(s);
|
||||
return;
|
||||
};
|
||||
if shown.id == s.cover_art || self.screen != Screen::NowPlaying {
|
||||
self.render_art(s);
|
||||
return;
|
||||
}
|
||||
let Some(print) = self.art_print(s) else { return };
|
||||
if Some(print) == self.art_shown.as_ref().map(|a| a.print) {
|
||||
log::debug!("same cover picture under a new id, no flip");
|
||||
self.render_art(s);
|
||||
} else {
|
||||
log::debug!("cover picture changed, flipping");
|
||||
self.ui.set_np_flip_out(true);
|
||||
self.flip_timer
|
||||
.start(slint::TimerMode::SingleShot, FLIP_OUT, || with_app(|app| app.flip_in()));
|
||||
}
|
||||
}
|
||||
|
||||
/// The picture the song's art will show: `Some(None)` for the placeholder,
|
||||
/// `None` while its cover is still loading.
|
||||
fn art_print(&mut self, s: &Song) -> Option<Option<u64>> {
|
||||
let Some(id) = s.cover_art.as_deref() else {
|
||||
return Some(None);
|
||||
};
|
||||
let key: CoverKey = (id.to_string(), self.now_playing_px());
|
||||
if let Some(p) = self.covers.prints.get(&key) {
|
||||
return Some(Some(*p));
|
||||
}
|
||||
if self.covers.failed.contains(&key) {
|
||||
return Some(None);
|
||||
}
|
||||
// Starts the load if it is not under way.
|
||||
self.cover(id, key.1);
|
||||
None
|
||||
}
|
||||
|
||||
/// Loads the next track's cover at the now-playing size, so a skip can
|
||||
/// tell at once whether the picture changes.
|
||||
fn prefetch_next_cover(&mut self) {
|
||||
if self.screen != Screen::NowPlaying {
|
||||
return;
|
||||
}
|
||||
let next = self.current.and_then(|i| self.queue.get(i + 1));
|
||||
if let Some(id) = next.and_then(|s| s.cover_art.clone()) {
|
||||
let px = self.now_playing_px();
|
||||
self.cover(&id, px);
|
||||
}
|
||||
}
|
||||
|
||||
/// Puts the song's cover, or its letter placeholder, on screen.
|
||||
fn render_art(&mut self, s: &Song) {
|
||||
let px = self.now_playing_px();
|
||||
let cover = s.cover_art.as_deref().and_then(|id| self.cover(id, px));
|
||||
let print = s
|
||||
.cover_art
|
||||
.as_ref()
|
||||
.and_then(|id| self.covers.prints.get(&(id.clone(), px)).copied())
|
||||
.filter(|_| cover.is_some());
|
||||
let name = s.album.as_deref().unwrap_or(&s.title);
|
||||
self.ui.set_np_letter(initial(name).into());
|
||||
self.ui.set_np_tint(tint(name));
|
||||
self.ui.set_np_has_cover(cover.is_some());
|
||||
self.ui.set_np_cover(cover.unwrap_or_default());
|
||||
self.art_shown = Some(ShownArt {
|
||||
id: s.cover_art.clone(),
|
||||
print,
|
||||
});
|
||||
}
|
||||
|
||||
/// The cover is edge-on: swap in the current track's art and turn it back.
|
||||
fn flip_in(&mut self) {
|
||||
if let Some(s) = self.current.and_then(|i| self.queue.get(i)).cloned() {
|
||||
self.render_art(&s);
|
||||
}
|
||||
self.ui.set_np_flip_out(false);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------- now playing
|
||||
|
||||
fn open_now_playing(&mut self) {
|
||||
@@ -1892,6 +2133,8 @@ impl App {
|
||||
round: false,
|
||||
show_art: true,
|
||||
playing: Some(index) == self.current,
|
||||
slider: false,
|
||||
level: 0.0,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1980,20 +2223,76 @@ 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 {
|
||||
entries: vec![Entry {
|
||||
title: "Colours from album art".to_string(),
|
||||
subtitle: "Tint the interface with the cover of the playing track".to_string(),
|
||||
detail: on_off(s.album_art_colours),
|
||||
number: String::new(),
|
||||
cover: None,
|
||||
round: false,
|
||||
show_art: false,
|
||||
target: Target::Setting(Setting::AlbumArtColours),
|
||||
}],
|
||||
entries: vec![
|
||||
Entry {
|
||||
title: "Colours from album art".to_string(),
|
||||
subtitle: "Tint the interface with the cover of the playing track".to_string(),
|
||||
detail: on_off(s.album_art_colours),
|
||||
number: String::new(),
|
||||
cover: None,
|
||||
round: false,
|
||||
show_art: false,
|
||||
target: Target::Setting(Setting::AlbumArtColours),
|
||||
},
|
||||
Entry {
|
||||
title: "Cover backdrop".to_string(),
|
||||
subtitle: "How much of the cover shows behind the now-playing screen".to_string(),
|
||||
detail: if s.cover_backdrop == 0 {
|
||||
"Off".to_string()
|
||||
} else {
|
||||
s.cover_backdrop.to_string()
|
||||
},
|
||||
number: String::new(),
|
||||
cover: None,
|
||||
round: false,
|
||||
show_art: false,
|
||||
target: Target::Setting(Setting::CoverBackdrop),
|
||||
},
|
||||
],
|
||||
..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);
|
||||
if up { (v + 5).min(100) } else { v.saturating_sub(5) }
|
||||
}
|
||||
|
||||
/// One step of the cover backdrop setting, kept within 0 to 100.
|
||||
fn step_backdrop(v: u8, up: bool) -> u8 {
|
||||
let v = v.min(100);
|
||||
if up { (v + 10).min(100) } else { v.saturating_sub(10) }
|
||||
}
|
||||
|
||||
/// The now-playing backdrop for a strength of 0 to 100: the cover's opacity
|
||||
/// and the background alpha over it at the left and right edges.
|
||||
///
|
||||
/// Up to the default the cover fades in under today's overlay. Above it the
|
||||
/// overlay thins too, but never below 0.55 on the left, where the title and
|
||||
/// progress are, so the text stays readable over a bright cover.
|
||||
fn backdrop_look(v: u8) -> (f32, f32, f32) {
|
||||
// Today's look, reached at the default.
|
||||
const OPACITY: f32 = 0.16;
|
||||
const LEFT: f32 = 0.67;
|
||||
const RIGHT: f32 = 0.95;
|
||||
// The strongest, at 100.
|
||||
const OPACITY_MAX: f32 = 0.40;
|
||||
const LEFT_MIN: f32 = 0.55;
|
||||
const RIGHT_MIN: f32 = 0.80;
|
||||
let v = v.min(100) as f32;
|
||||
let d = config::COVER_BACKDROP_DEFAULT as f32;
|
||||
if v <= d {
|
||||
return (OPACITY * v / d, LEFT, RIGHT);
|
||||
}
|
||||
let u = (v - d) / (100.0 - d);
|
||||
(
|
||||
OPACITY + u * (OPACITY_MAX - OPACITY),
|
||||
LEFT + u * (LEFT_MIN - LEFT),
|
||||
RIGHT + u * (RIGHT_MIN - RIGHT),
|
||||
)
|
||||
}
|
||||
|
||||
fn search_data(r: SearchResult) -> PageData {
|
||||
let mut entries: Vec<Entry> = r.artist.into_iter().map(artist_entry).collect();
|
||||
entries.extend(r.album.into_iter().map(|a| Entry {
|
||||
@@ -2033,7 +2332,7 @@ fn bucket(px: f32) -> u32 {
|
||||
}
|
||||
|
||||
/// Decodes a cover at `px` and works out its tone for the album art palette.
|
||||
fn decode_cover(bytes: &[u8], px: u32) -> Result<(SharedPixelBuffer<Rgb8Pixel>, Option<Tone>)> {
|
||||
fn decode_cover(bytes: &[u8], px: u32) -> Result<(SharedPixelBuffer<Rgb8Pixel>, Option<Tone>, u64)> {
|
||||
let img = image::load_from_memory(bytes)?;
|
||||
let img = if img.width() > px || img.height() > px {
|
||||
img.resize(px, px, image::imageops::FilterType::Triangle)
|
||||
@@ -2046,8 +2345,11 @@ fn decode_cover(bytes: &[u8], px: u32) -> Result<(SharedPixelBuffer<Rgb8Pixel>,
|
||||
.to_rgb8();
|
||||
let tone = crate::palette::tone(small.as_raw());
|
||||
let rgb = img.to_rgb8();
|
||||
let mut hasher = std::hash::DefaultHasher::new();
|
||||
std::hash::Hash::hash(rgb.as_raw(), &mut hasher);
|
||||
let print = std::hash::Hasher::finish(&hasher);
|
||||
let buf = SharedPixelBuffer::clone_from_slice(rgb.as_raw(), rgb.width(), rgb.height());
|
||||
Ok((buf, tone))
|
||||
Ok((buf, tone, print))
|
||||
}
|
||||
|
||||
fn color(lab: Lab) -> Color {
|
||||
@@ -2156,6 +2458,61 @@ fn join_dot<I: IntoIterator<Item = Option<String>>>(parts: I) -> String {
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
fn png(pixel: [u8; 3]) -> Vec<u8> {
|
||||
let img = image::RgbImage::from_pixel(8, 8, image::Rgb(pixel));
|
||||
let mut out = std::io::Cursor::new(Vec::new());
|
||||
img.write_to(&mut out, image::ImageFormat::Png).unwrap();
|
||||
out.into_inner()
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn one_picture_under_two_ids_has_one_print() {
|
||||
let (_, _, a) = decode_cover(&png([120, 20, 30]), 64).unwrap();
|
||||
let (_, _, b) = decode_cover(&png([120, 20, 30]), 64).unwrap();
|
||||
let (_, _, c) = decode_cover(&png([20, 120, 30]), 64).unwrap();
|
||||
assert_eq!(a, b);
|
||||
assert_ne!(a, c);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn volume_steps_stay_in_range() {
|
||||
assert_eq!(step_volume(50, true), 55);
|
||||
assert_eq!(step_volume(50, false), 45);
|
||||
assert_eq!(step_volume(100, true), 100);
|
||||
assert_eq!(step_volume(98, true), 100);
|
||||
assert_eq!(step_volume(0, false), 0);
|
||||
assert_eq!(step_volume(3, false), 0);
|
||||
assert_eq!(step_volume(200, false), 95);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn default_backdrop_looks_like_before_it_was_a_setting() {
|
||||
assert_eq!(backdrop_look(config::COVER_BACKDROP_DEFAULT), (0.16, 0.67, 0.95));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn backdrop_off_draws_no_cover() {
|
||||
assert_eq!(backdrop_look(0).0, 0.0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn backdrop_strongest_keeps_an_overlay() {
|
||||
let (opacity, left, right) = backdrop_look(100);
|
||||
assert!((opacity - 0.40).abs() < 1e-6);
|
||||
assert!((left - 0.55).abs() < 1e-6);
|
||||
assert!((right - 0.80).abs() < 1e-6);
|
||||
assert_eq!(backdrop_look(250), backdrop_look(100));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn backdrop_steps_stay_in_range() {
|
||||
assert_eq!(step_backdrop(30, true), 40);
|
||||
assert_eq!(step_backdrop(30, false), 20);
|
||||
assert_eq!(step_backdrop(100, true), 100);
|
||||
assert_eq!(step_backdrop(0, false), 0);
|
||||
assert_eq!(step_backdrop(200, false), 90);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn grid_window_is_row_aligned() {
|
||||
assert_eq!(window(1000, 0, 5, false), (0, 55));
|
||||
|
||||
@@ -88,11 +88,31 @@ pub fn save(cfg: &Config) -> Result<()> {
|
||||
}
|
||||
|
||||
/// Preferences. Kept apart from the login, so logging out does not reset them.
|
||||
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(default)]
|
||||
pub struct Settings {
|
||||
/// Tint the UI with the colours of the playing track's cover.
|
||||
pub album_art_colours: bool,
|
||||
/// How strongly the cover shows behind the now-playing screen, 0 to 100.
|
||||
pub cover_backdrop: u8,
|
||||
/// Playback volume, 0 to 100. Only remus's own stream, not the system's.
|
||||
pub volume: u8,
|
||||
/// Muted, keeping `volume` for when it is unmuted.
|
||||
pub muted: bool,
|
||||
}
|
||||
|
||||
/// The cover backdrop strength that looks like it did before it was a setting.
|
||||
pub const COVER_BACKDROP_DEFAULT: u8 = 30;
|
||||
|
||||
impl Default for Settings {
|
||||
fn default() -> Self {
|
||||
Settings {
|
||||
album_art_colours: false,
|
||||
cover_backdrop: COVER_BACKDROP_DEFAULT,
|
||||
volume: 100,
|
||||
muted: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn settings_path() -> Option<PathBuf> {
|
||||
@@ -193,12 +213,25 @@ mod tests {
|
||||
let s: Settings = toml::from_str("").unwrap();
|
||||
assert_eq!(s, Settings::default());
|
||||
assert!(!s.album_art_colours);
|
||||
assert_eq!(s.cover_backdrop, COVER_BACKDROP_DEFAULT);
|
||||
assert_eq!(s.volume, 100);
|
||||
assert!(!s.muted);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn settings_from_before_the_backdrop_load_its_default() {
|
||||
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);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn settings_round_trip() {
|
||||
let s = Settings {
|
||||
album_art_colours: true,
|
||||
cover_backdrop: 70,
|
||||
volume: 35,
|
||||
muted: true,
|
||||
};
|
||||
let back: Settings = toml::from_str(&toml::to_string(&s).unwrap()).unwrap();
|
||||
assert_eq!(back, s);
|
||||
|
||||
@@ -91,6 +91,9 @@ fn step(ui: slint::Weak<AppWindow>, steps: Vec<String>, i: usize) {
|
||||
"now-playing" => Action::NowPlaying,
|
||||
"search" => Action::Search,
|
||||
"quit" => Action::Quit,
|
||||
"volume-up" => Action::VolumeUp,
|
||||
"volume-down" => Action::VolumeDown,
|
||||
"mute" => Action::ToggleMute,
|
||||
other => {
|
||||
log::warn!("unknown dev script step {other}");
|
||||
Action::None
|
||||
|
||||
@@ -93,7 +93,7 @@ pub fn spawn_gamepad(emit: impl Fn(PadEvent) + Send + 'static) {
|
||||
EventType::AxisChanged(axis, value, _) => {
|
||||
let source = match axis {
|
||||
Axis::LeftStickX | Axis::LeftStickY => Source::LeftStick,
|
||||
Axis::RightStickX => Source::RightStick,
|
||||
Axis::RightStickX | Axis::RightStickY => Source::RightStick,
|
||||
_ => continue,
|
||||
};
|
||||
let pad = gilrs.gamepad(ev.id);
|
||||
@@ -226,6 +226,7 @@ fn button_action(b: Button) -> Option<Action> {
|
||||
Button::RightTrigger2 => Action::SectionNext,
|
||||
Button::Start => Action::NowPlaying,
|
||||
Button::Select => Action::Search,
|
||||
Button::RightThumb => Action::ToggleMute,
|
||||
_ => return None,
|
||||
})
|
||||
}
|
||||
@@ -247,12 +248,17 @@ fn stick_direction(source: Source, pad: &gilrs::Gamepad<'_>, _changed: f32, held
|
||||
Some(if y > 0.0 { Action::Up } else { Action::Down })
|
||||
}
|
||||
}
|
||||
// Across seeks, up and down set the volume. The dominant axis wins, so
|
||||
// a diagonal push does only one of them.
|
||||
Source::RightStick => {
|
||||
let x = pad.value(Axis::RightStickX);
|
||||
if x.abs() < threshold {
|
||||
let y = pad.value(Axis::RightStickY);
|
||||
if x.abs() < threshold && y.abs() < threshold {
|
||||
None
|
||||
} else {
|
||||
} else if x.abs() > y.abs() {
|
||||
Some(if x > 0.0 { Action::SeekForward } else { Action::SeekBack })
|
||||
} else {
|
||||
Some(if y > 0.0 { Action::VolumeUp } else { Action::VolumeDown })
|
||||
}
|
||||
}
|
||||
Source::DPad => None,
|
||||
|
||||
@@ -177,6 +177,17 @@ impl Player {
|
||||
}
|
||||
}
|
||||
|
||||
/// Sets remus's own playback volume, 0 to 100. Cubic, so equal steps
|
||||
/// sound equally loud apart.
|
||||
pub fn set_volume(&self, level: u8) {
|
||||
let v = level.min(100) as f64 / 100.0;
|
||||
self.playbin.set_property("volume", v * v * v);
|
||||
}
|
||||
|
||||
pub fn set_muted(&self, muted: bool) {
|
||||
self.playbin.set_property("mute", muted);
|
||||
}
|
||||
|
||||
pub fn seek(&self, seconds: f64) {
|
||||
let Some(pos) = self.playbin.query_position::<gst::ClockTime>() else {
|
||||
return;
|
||||
|
||||
@@ -33,6 +33,8 @@ pub enum Control {
|
||||
Search,
|
||||
NowPlaying,
|
||||
Seek,
|
||||
Volume,
|
||||
Mute,
|
||||
/// Steam + X brings up Steam's on-screen keyboard. Nothing to show for a
|
||||
/// real keyboard.
|
||||
OnScreenKeyboard,
|
||||
@@ -40,7 +42,7 @@ pub enum Control {
|
||||
|
||||
#[cfg(test)]
|
||||
impl Control {
|
||||
pub const ALL: [Control; 10] = [
|
||||
pub const ALL: [Control; 12] = [
|
||||
Control::Activate,
|
||||
Control::Back,
|
||||
Control::PlayPause,
|
||||
@@ -50,6 +52,8 @@ impl Control {
|
||||
Control::Search,
|
||||
Control::NowPlaying,
|
||||
Control::Seek,
|
||||
Control::Volume,
|
||||
Control::Mute,
|
||||
Control::OnScreenKeyboard,
|
||||
];
|
||||
}
|
||||
@@ -75,6 +79,8 @@ pub fn icons(prompts: Prompts, control: Control) -> &'static [&'static [u8]] {
|
||||
Search => &[icon!("keyboard", "keyboard_slash_forward")],
|
||||
NowPlaying => &[icon!("keyboard", "keyboard_f")],
|
||||
Seek => &[icon!("keyboard", "keyboard_arrows_horizontal")],
|
||||
Volume => &[icon!("keyboard", "keyboard_minus"), icon!("keyboard", "keyboard_plus")],
|
||||
Mute => &[icon!("keyboard", "keyboard_m")],
|
||||
OnScreenKeyboard => &[],
|
||||
},
|
||||
Prompts::Pad(Family::Xbox) => match control {
|
||||
@@ -87,6 +93,8 @@ pub fn icons(prompts: Prompts, control: Control) -> &'static [&'static [u8]] {
|
||||
Search => &[icon!("xbox", "xbox_button_view")],
|
||||
NowPlaying => &[icon!("xbox", "xbox_button_menu")],
|
||||
Seek => &[icon!("xbox", "xbox_dpad_horizontal")],
|
||||
Volume => &[icon!("xbox", "xbox_stick_r_vertical")],
|
||||
Mute => &[icon!("xbox", "xbox_stick_r_press")],
|
||||
OnScreenKeyboard => &[icon!("xbox", "xbox_guide"), icon!("xbox", "xbox_button_color_x")],
|
||||
},
|
||||
Prompts::Pad(Family::PlayStation) => match control {
|
||||
@@ -105,6 +113,8 @@ pub fn icons(prompts: Prompts, control: Control) -> &'static [&'static [u8]] {
|
||||
Search => &[icon!("playstation", "playstation5_button_create")],
|
||||
NowPlaying => &[icon!("playstation", "playstation5_button_options")],
|
||||
Seek => &[icon!("playstation", "playstation_dpad_horizontal")],
|
||||
Volume => &[icon!("playstation", "playstation_stick_r_vertical")],
|
||||
Mute => &[icon!("playstation", "playstation_stick_r_press")],
|
||||
// The pack has no PS button; Steam's own label says the same thing.
|
||||
OnScreenKeyboard => &[
|
||||
icon!("steamdeck", "steamdeck_button_guide"),
|
||||
@@ -122,6 +132,8 @@ pub fn icons(prompts: Prompts, control: Control) -> &'static [&'static [u8]] {
|
||||
Search => &[icon!("switch", "switch_button_minus")],
|
||||
NowPlaying => &[icon!("switch", "switch_button_plus")],
|
||||
Seek => &[icon!("switch", "switch_dpad_horizontal")],
|
||||
Volume => &[icon!("switch", "switch_stick_r_vertical")],
|
||||
Mute => &[icon!("switch", "switch_stick_r_press")],
|
||||
OnScreenKeyboard => &[
|
||||
icon!("switch", "switch_button_home"),
|
||||
icon!("switch", "switch_button_y"),
|
||||
@@ -143,6 +155,8 @@ pub fn icons(prompts: Prompts, control: Control) -> &'static [&'static [u8]] {
|
||||
Search => &[icon!("steamdeck", "steamdeck_button_view")],
|
||||
NowPlaying => &[icon!("steamdeck", "steamdeck_button_options")],
|
||||
Seek => &[icon!("steamdeck", "steamdeck_dpad_horizontal")],
|
||||
Volume => &[icon!("steamdeck", "steamdeck_stick_r_vertical")],
|
||||
Mute => &[icon!("steamdeck", "steamdeck_stick_r_press")],
|
||||
OnScreenKeyboard => &[
|
||||
icon!("steamdeck", "steamdeck_button_guide"),
|
||||
icon!("steamdeck", "steamdeck_button_x"),
|
||||
|
||||
@@ -9,6 +9,7 @@ export enum Action {
|
||||
none, up, down, left, right, page-up, page-down, activate, back,
|
||||
play-pause, next, prev, queue, section-next, section-prev,
|
||||
now-playing, search, seek-forward, seek-back, toggle-fullscreen, quit,
|
||||
volume-up, volume-down, toggle-mute,
|
||||
}
|
||||
|
||||
export enum Screen { login, browse, now-playing }
|
||||
@@ -27,6 +28,9 @@ export struct Item {
|
||||
round: bool,
|
||||
show-art: bool,
|
||||
playing: bool,
|
||||
// A setting with a range: draws `level` (0 to 1) as a slider before `detail`.
|
||||
slider: bool,
|
||||
level: float,
|
||||
}
|
||||
|
||||
export struct Header {
|
||||
@@ -237,10 +241,38 @@ component Row inherits Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
if root.item.slider: VerticalLayout {
|
||||
alignment: center;
|
||||
Rectangle {
|
||||
width: 180px * Theme.s;
|
||||
height: 6px * Theme.s;
|
||||
border-radius: 3px * Theme.s;
|
||||
background: Theme.line;
|
||||
Rectangle {
|
||||
x: 0;
|
||||
width: parent.width * root.item.level;
|
||||
border-radius: 3px * Theme.s;
|
||||
background: root.selected && root.active ? Theme.highlight : Theme.muted;
|
||||
animate width { duration: 120ms; easing: ease-out; }
|
||||
}
|
||||
Rectangle {
|
||||
x: parent.width * root.item.level - self.width / 2;
|
||||
width: 16px * Theme.s;
|
||||
height: 16px * Theme.s;
|
||||
border-radius: 8px * Theme.s;
|
||||
background: root.selected && root.active ? Theme.text : Theme.muted;
|
||||
animate x { duration: 120ms; easing: ease-out; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
// Fixed for a slider, so the bar does not shift as the number grows.
|
||||
min-width: root.item.slider ? 44px * Theme.s : 0;
|
||||
text: root.item.detail;
|
||||
font-size: 15px * Theme.s;
|
||||
color: Theme.muted;
|
||||
horizontal-alignment: right;
|
||||
vertical-alignment: center;
|
||||
}
|
||||
}
|
||||
@@ -473,6 +505,123 @@ component SearchBox inherits Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
// Play triangle or pause bars, drawn as vectors so no font fallback can turn
|
||||
// them into emoji or give the two different weights.
|
||||
component PlayState {
|
||||
in property <bool> paused;
|
||||
in property <color> tint: Theme.highlight;
|
||||
in property <length> size: 14px * Theme.s;
|
||||
width: root.size;
|
||||
height: root.size;
|
||||
|
||||
if !root.paused: Path {
|
||||
width: root.size;
|
||||
height: root.size;
|
||||
viewbox-width: 12;
|
||||
viewbox-height: 12;
|
||||
commands: "M 1.5 0.5 L 11.5 6 L 1.5 11.5 Z";
|
||||
fill: root.tint;
|
||||
}
|
||||
if root.paused: Rectangle {
|
||||
x: root.size * 0.12;
|
||||
width: root.size * 0.28;
|
||||
height: root.size;
|
||||
border-radius: root.size * 0.06;
|
||||
background: root.tint;
|
||||
}
|
||||
if root.paused: Rectangle {
|
||||
x: root.size * 0.60;
|
||||
width: root.size * 0.28;
|
||||
height: root.size;
|
||||
border-radius: root.size * 0.06;
|
||||
background: root.tint;
|
||||
}
|
||||
}
|
||||
|
||||
// A speaker with sound waves, or with a cross when muted.
|
||||
component Speaker {
|
||||
in property <bool> muted;
|
||||
in property <color> tint: Theme.text;
|
||||
in property <length> size: 16px * Theme.s;
|
||||
width: root.size;
|
||||
height: root.size;
|
||||
|
||||
Path {
|
||||
width: root.size;
|
||||
height: root.size;
|
||||
viewbox-width: 16;
|
||||
viewbox-height: 16;
|
||||
commands: "M 1 5.5 L 4.5 5.5 L 8.5 2 L 8.5 14 L 4.5 10.5 L 1 10.5 Z";
|
||||
fill: root.tint;
|
||||
}
|
||||
Path {
|
||||
width: root.size;
|
||||
height: root.size;
|
||||
viewbox-width: 16;
|
||||
viewbox-height: 16;
|
||||
commands: root.muted
|
||||
? "M 10.5 5.5 L 15 10 M 15 5.5 L 10.5 10"
|
||||
: "M 10.5 5.5 A 3.2 3.2 0 0 1 10.5 10.5 M 12.5 3.5 A 6 6 0 0 1 12.5 12.5";
|
||||
stroke: root.tint;
|
||||
stroke-width: 1.6px * root.size / 16px;
|
||||
}
|
||||
}
|
||||
|
||||
// The level after a volume change, faded out again by the app after a moment.
|
||||
component VolumeOverlay inherits Rectangle {
|
||||
in property <bool> shown;
|
||||
in property <int> level;
|
||||
in property <bool> muted;
|
||||
|
||||
width: 300px * Theme.s;
|
||||
height: 56px * Theme.s;
|
||||
border-radius: 28px * Theme.s;
|
||||
background: Theme.raised;
|
||||
border-width: 1px * Theme.s;
|
||||
border-color: Theme.line;
|
||||
drop-shadow-blur: 20px * Theme.s;
|
||||
drop-shadow-color: #00000080;
|
||||
opacity: root.shown ? 1 : 0;
|
||||
animate opacity { duration: 180ms; }
|
||||
|
||||
HorizontalLayout {
|
||||
padding-left: 22px * Theme.s;
|
||||
padding-right: 22px * Theme.s;
|
||||
spacing: 14px * Theme.s;
|
||||
VerticalLayout {
|
||||
alignment: center;
|
||||
Speaker {
|
||||
muted: root.muted || root.level == 0;
|
||||
size: 22px * Theme.s;
|
||||
}
|
||||
}
|
||||
VerticalLayout {
|
||||
alignment: center;
|
||||
horizontal-stretch: 1;
|
||||
Rectangle {
|
||||
height: 6px * Theme.s;
|
||||
border-radius: 3px * Theme.s;
|
||||
background: Theme.line;
|
||||
Rectangle {
|
||||
x: 0;
|
||||
width: parent.width * (root.muted ? 0 : root.level / 100);
|
||||
border-radius: 3px * Theme.s;
|
||||
background: Theme.highlight;
|
||||
animate width { duration: 100ms; easing: ease-out; }
|
||||
}
|
||||
}
|
||||
}
|
||||
Text {
|
||||
min-width: 48px * Theme.s;
|
||||
text: root.muted ? "Muted" : root.level;
|
||||
font-size: 16px * Theme.s;
|
||||
color: Theme.text;
|
||||
horizontal-alignment: right;
|
||||
vertical-alignment: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
component NowBar inherits Rectangle {
|
||||
in property <bool> has-track;
|
||||
in property <string> title;
|
||||
@@ -543,11 +692,12 @@ component NowBar inherits Rectangle {
|
||||
color: Theme.muted;
|
||||
vertical-alignment: center;
|
||||
}
|
||||
if root.has-track: Text {
|
||||
text: root.paused ? "❚❚" : "▶";
|
||||
font-size: 18px * Theme.s;
|
||||
color: Theme.highlight;
|
||||
vertical-alignment: center;
|
||||
if root.has-track: VerticalLayout {
|
||||
alignment: center;
|
||||
PlayState {
|
||||
paused: root.paused;
|
||||
size: 15px * Theme.s;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -756,6 +906,16 @@ component NowPlayingView inherits Rectangle {
|
||||
in property <string> duration;
|
||||
in property <bool> paused;
|
||||
in property <bool> has-track;
|
||||
// From the cover backdrop setting: the blown-up cover's opacity and the
|
||||
// alpha of the background drawn over it, at the left and right edges.
|
||||
in property <int> volume: 100;
|
||||
in property <bool> muted;
|
||||
in property <float> backdrop-opacity: 0.16;
|
||||
in property <float> backdrop-left: 0.67;
|
||||
in property <float> backdrop-right: 0.95;
|
||||
// True while the cover turns away; the app swaps the cover at edge-on and
|
||||
// sets it back to false to turn the new one in.
|
||||
in property <bool> flip-out;
|
||||
in property <[Item]> queue;
|
||||
in property <int> queue-count;
|
||||
in property <int> queue-selected;
|
||||
@@ -765,15 +925,15 @@ component NowPlayingView inherits Rectangle {
|
||||
out property <length> art-size: 440px * Theme.s;
|
||||
|
||||
// Blown-up cover as a dim backdrop.
|
||||
if root.has-cover: Image {
|
||||
if root.has-cover && root.backdrop-opacity > 0: Image {
|
||||
width: parent.width;
|
||||
height: parent.height;
|
||||
source: root.cover;
|
||||
image-fit: ImageFit.cover;
|
||||
opacity: 0.16;
|
||||
opacity: root.backdrop-opacity;
|
||||
}
|
||||
Rectangle {
|
||||
background: @linear-gradient(90deg, Theme.bg.with-alpha(0.67), Theme.bg.with-alpha(0.95));
|
||||
background: @linear-gradient(90deg, Theme.bg.with-alpha(root.backdrop-left), Theme.bg.with-alpha(root.backdrop-right));
|
||||
}
|
||||
|
||||
HorizontalLayout {
|
||||
@@ -786,9 +946,11 @@ component NowPlayingView inherits Rectangle {
|
||||
spacing: 10px * Theme.s;
|
||||
width: root.art-size;
|
||||
|
||||
Art {
|
||||
art := Art {
|
||||
width: root.art-size;
|
||||
height: root.art-size;
|
||||
// Set here so the turned state below has a value to return to.
|
||||
transform-scale-x: 100%;
|
||||
source: root.cover;
|
||||
has-image: root.has-cover;
|
||||
tint: root.tint;
|
||||
@@ -836,12 +998,17 @@ component NowPlayingView inherits Rectangle {
|
||||
font-size: 14px * Theme.s;
|
||||
color: Theme.muted;
|
||||
}
|
||||
Text {
|
||||
// Sized below the time text, so the row keeps the text's height.
|
||||
HorizontalLayout {
|
||||
horizontal-stretch: 1;
|
||||
text: root.has-track ? (root.paused ? "Paused" : "Playing") : "";
|
||||
font-size: 14px * Theme.s;
|
||||
color: Theme.highlight;
|
||||
horizontal-alignment: center;
|
||||
alignment: center;
|
||||
if root.has-track: VerticalLayout {
|
||||
alignment: center;
|
||||
PlayState {
|
||||
paused: root.paused;
|
||||
size: 11px * Theme.s;
|
||||
}
|
||||
}
|
||||
}
|
||||
Text {
|
||||
text: root.duration;
|
||||
@@ -849,6 +1016,38 @@ component NowPlayingView inherits Rectangle {
|
||||
color: Theme.muted;
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
VerticalLayout {
|
||||
@@ -873,6 +1072,20 @@ component NowPlayingView inherits Rectangle {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// A flip around the vertical axis, faked by squashing the width: Slint has
|
||||
// no perspective. The turn back overshoots a little and settles.
|
||||
states [
|
||||
turned when root.flip-out: {
|
||||
art.transform-scale-x: 0%;
|
||||
in {
|
||||
animate art.transform-scale-x { duration: 170ms; easing: ease-in; }
|
||||
}
|
||||
out {
|
||||
animate art.transform-scale-x { duration: 380ms; easing: cubic-bezier(0.34, 1.5, 0.64, 1); }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
export component AppWindow inherits Window {
|
||||
@@ -936,6 +1149,10 @@ export component AppWindow inherits Window {
|
||||
in property <string> np-position;
|
||||
in property <string> np-duration;
|
||||
in property <bool> np-paused;
|
||||
in property <bool> np-flip-out;
|
||||
in property <float> np-backdrop-opacity: 0.16;
|
||||
in property <float> np-backdrop-left: 0.67;
|
||||
in property <float> np-backdrop-right: 0.95;
|
||||
in property <[Item]> queue-items;
|
||||
in property <int> queue-count;
|
||||
in property <int> queue-selected;
|
||||
@@ -943,6 +1160,10 @@ export component AppWindow inherits Window {
|
||||
|
||||
in property <[Hint]> hints;
|
||||
in property <string> toast;
|
||||
// The volume overlay, shown briefly after any volume change.
|
||||
in property <bool> volume-shown;
|
||||
in property <int> volume;
|
||||
in property <bool> muted;
|
||||
in property <string> version;
|
||||
|
||||
public function focus-main() {
|
||||
@@ -996,6 +1217,10 @@ export component AppWindow inherits Window {
|
||||
if (e.text == "f") { root.action(Action.now-playing); return accept; }
|
||||
if (e.text == ",") { root.action(Action.seek-back); return accept; }
|
||||
if (e.text == ".") { root.action(Action.seek-forward); return accept; }
|
||||
// = is + without shift on most layouts.
|
||||
if (e.text == "+" || e.text == "=") { root.action(Action.volume-up); return accept; }
|
||||
if (e.text == "-") { root.action(Action.volume-down); return accept; }
|
||||
if (e.text == "m") { root.action(Action.toggle-mute); return accept; }
|
||||
reject
|
||||
}
|
||||
|
||||
@@ -1097,6 +1322,12 @@ export component AppWindow inherits Window {
|
||||
duration: root.np-duration;
|
||||
paused: root.np-paused;
|
||||
has-track: root.np-has-track;
|
||||
flip-out: root.np-flip-out;
|
||||
volume: root.volume;
|
||||
muted: root.muted;
|
||||
backdrop-opacity: root.np-backdrop-opacity;
|
||||
backdrop-left: root.np-backdrop-left;
|
||||
backdrop-right: root.np-backdrop-right;
|
||||
queue: root.queue-items;
|
||||
queue-count: root.queue-count;
|
||||
queue-selected: root.queue-selected;
|
||||
@@ -1121,6 +1352,14 @@ export component AppWindow inherits Window {
|
||||
color: Theme.text;
|
||||
}
|
||||
}
|
||||
|
||||
VolumeOverlay {
|
||||
x: (parent.width - self.width) / 2;
|
||||
y: parent.height - self.height - 32px * Theme.s;
|
||||
shown: root.volume-shown;
|
||||
level: root.volume;
|
||||
muted: root.muted;
|
||||
}
|
||||
}
|
||||
|
||||
if root.screen == Screen.browse: NowBar {
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<defs/>
|
||||
<g>
|
||||
<path stroke="none" fill="#FFFFFF" d="M22 42 L26 42 26 32 31 42 33 42 38 32 38 42 42 42 42 22 38 22 32 34 26 22 22 22 22 42 M16 8 L48 8 Q56 8 56 16 L56 48 Q56 56 48 56 L16 56 Q8 56 8 48 L8 16 Q8 8 16 8"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 345 B |
@@ -0,0 +1,6 @@
|
||||
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<defs/>
|
||||
<g>
|
||||
<path stroke="none" fill="#FFFFFF" d="M16 8 L48 8 Q56 8 56 16 L56 48 Q56 56 48 56 L16 56 Q8 56 8 48 L8 16 Q8 8 16 8 M40 30 L24 30 24 34 40 34 40 30"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 291 B |
@@ -0,0 +1,6 @@
|
||||
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<defs/>
|
||||
<g>
|
||||
<path stroke="none" fill="#FFFFFF" d="M40 30 L34 30 34 24 30 24 30 30 24 30 24 34 30 34 30 40 34 40 34 34 40 34 40 30 M16 8 L48 8 Q56 8 56 16 L56 48 Q56 52.9 53 54.8 51.1 56 48 56 L16 56 Q12.9 56 11 54.8 8 52.9 8 48 L8 16 Q8 8 16 8"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 375 B |
@@ -0,0 +1,6 @@
|
||||
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<defs/>
|
||||
<g>
|
||||
<path stroke="none" fill="#FFFFFF" d="M43 50 Q43 52.5 39.75 54.25 36.55 56 32 56 27.5 56 24.25 54.25 21 52.5 21 50 L21 47.9 Q17.8 46.55 15 44.3 8 38.7 8 30.65 L8 30.1 8 29.55 8 29 8 28.5 8 28.1 8 27.95 8 27.4 Q8 19.4 15 13.65 18.5 10.85 22.75 9.45 L26.15 12.95 Q21.25 14.05 17.4 17.1 L17.45 17.1 Q12.15 21.4 12 27.4 12.1 33.45 17.4 37.65 23.45 42.5 32 42.5 40.55 42.5 46.55 37.7 L46.6 37.65 Q51.9 33.4 52 27.4 51.85 21.4 46.55 17.1 42.75 14.05 37.9 12.95 L41.25 9.45 Q45.5 10.85 48.95 13.65 56 19.4 56 27.4 L56 27.95 56 28.1 56 28.5 56 29 56 29.55 56 30.1 56 30.65 Q56 38.7 48.95 44.3 46.2 46.55 43 47.9 L43 50 M44.15 19 Q47.7 22 48 25.95 L48 26.05 Q47.7 30 44.2 32.9 L44 33.05 Q39.05 37 32 37 24.85 37 19.8 32.95 L19.7 32.9 Q16.3 30 16 26.1 L16 26.05 Q16.25 22 19.85 19 L19.95 18.9 Q23.65 16.05 28.4 15.3 L28.7 15.6 Q30 17 32 17 33.85 17.05 35.3 15.65 L35.3 15.6 35.6 15.3 Q40.5 16.05 44.2 19 L44.15 19 M30.85 13.5 L24.45 6.85 Q24 6.35 24 5.65 24 4.95 24.45 4.5 24.9 4 25.6 4 L38.4 4 Q39.05 4 39.55 4.5 40 4.95 40 5.65 40 6.35 39.55 6.85 L33.15 13.5 Q32.65 14 32 14 31.3 14 30.85 13.5 M33 30 L34 29.9 34 30 35 33 38 33 36.5 28.5 Q38 27.05 38 25 38 22.95 36.5 21.45 35.05 20 33 20 L27 20 27 33 30 33 30 30 33 30 M30 27 L30 23 33 23 Q33.85 23 34.4 23.55 35 24.15 35 25 35 25.85 34.4 26.4 33.85 27 33.05 27 L30 27"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1,6 @@
|
||||
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<defs/>
|
||||
<g>
|
||||
<path stroke="none" fill="#FFFFFF" d="M43 50 Q43 52.5 39.75 54.25 36.55 56 32 56 27.5 56 24.25 54.25 21 52.5 21 50 L21 47.9 Q17.8 46.55 15 44.3 8 38.7 8 30.65 L8 30.1 8 29.55 8 29 8 28.5 8 28.1 8 27.95 8 27.4 Q8 19.4 15 13.65 17.8 11.4 21 10.1 L21 10.35 Q21 12.25 22.25 13.5 L22.75 14 Q19.85 15.15 17.4 17.1 L17.45 17.1 Q12.15 21.4 12 27.4 12.1 33.45 17.4 37.65 L21.25 40.15 Q21 40.8 21 41.65 21 43.5 22.25 44.85 L22.3 44.95 28.7 51.6 Q30 53 32 53 33.85 53.05 35.3 51.65 L35.3 51.6 41.7 44.95 41.8 44.85 Q43 43.5 43 41.65 L42.8 40.15 46.55 37.7 46.6 37.65 Q51.9 33.4 52 27.4 51.85 21.4 46.55 17.1 44.1 15.15 41.3 14 L41.7 13.6 Q43 12.35 43 10.35 L43 10.1 Q46.2 11.4 48.95 13.65 56 19.4 56 27.4 L56 27.95 56 28.1 56 28.5 56 29 56 29.55 56 30.1 56 30.65 Q56 38.7 48.95 44.3 46.2 46.55 43 47.9 L43 50 M44.15 19 Q47.7 22 48 25.95 L48 26.05 Q47.7 30 44.2 32.9 L44 33.05 Q39.35 36.75 32.8 37 L31.2 37 Q24.55 36.75 19.8 32.95 L19.7 32.9 Q16.3 30 16 26.1 L16 26.05 Q16.25 22 19.85 19 L19.95 18.9 Q24.7 15.2 31.2 15 L32.8 15 Q39.45 15.25 44.2 19 L44.15 19 M30 27 L30 23 33 23 Q33.85 23 34.4 23.55 35 24.15 35 25 35 25.85 34.4 26.4 33.85 27 33.05 27 L30 27 M33 30 L34 29.9 34 30 35 33 38 33 36.5 28.5 Q38 27.05 38 25 38 22.95 36.5 21.45 35.05 20 33 20 L27 20 27 33 30 33 30 30 33 30 M30.85 2.5 Q31.3 2 32 2 32.65 2 33.15 2.5 L39.55 9.15 Q40 9.65 40 10.35 40 11.05 39.55 11.5 39.05 12 38.4 12 L25.6 12 Q24.9 12 24.45 11.5 24 11.05 24 10.35 24 9.65 24.45 9.15 L30.85 2.5 M30.85 49.5 L24.45 42.85 Q24 42.35 24 41.65 L24.05 41.3 24.45 40.5 Q24.9 40 25.6 40 L38.4 40 Q39.05 40 39.55 40.5 L40 41.3 40 41.65 Q40 42.35 39.55 42.85 L33.15 49.5 Q32.65 50 32 50 31.3 50 30.85 49.5"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
@@ -0,0 +1,6 @@
|
||||
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<defs/>
|
||||
<g>
|
||||
<path stroke="none" fill="#FFFFFF" d="M43 50 Q43 52.5 39.75 54.25 36.55 56 32 56 27.5 56 24.25 54.25 21 52.5 21 50 L21 47.9 Q17.8 46.55 15 44.3 8 38.7 8 30.65 L8 30.1 8 29.55 8 29 8 28.5 8 28.1 8 27.95 8 27.4 Q8 19.4 15 13.65 18.5 10.85 22.75 9.45 L26.15 12.95 Q21.25 14.05 17.4 17.1 L17.45 17.1 Q12.15 21.4 12 27.4 12.1 33.45 17.4 37.65 23.45 42.5 32 42.5 40.55 42.5 46.55 37.7 L46.6 37.65 Q51.9 33.4 52 27.4 51.85 21.4 46.55 17.1 42.75 14.05 37.9 12.95 L41.25 9.45 Q45.5 10.85 48.95 13.65 56 19.4 56 27.4 L56 27.95 56 28.1 56 28.5 56 29 56 29.55 56 30.1 56 30.65 Q56 38.7 48.95 44.3 46.2 46.55 43 47.9 L43 50 M44.15 19 Q47.7 22 48 25.95 L48 26.05 Q47.7 30 44.2 32.9 L44 33.05 Q39.05 37 32 37 24.85 37 19.8 32.95 L19.7 32.9 Q16.3 30 16 26.1 L16 26.05 Q16.25 22 19.85 19 L19.95 18.9 Q23.65 16.05 28.4 15.3 L28.7 15.6 Q30 17 32 17 33.85 17.05 35.3 15.65 L35.3 15.6 35.6 15.3 Q40.5 16.05 44.2 19 L44.15 19 M30.85 13.5 L24.45 6.85 Q24 6.35 24 5.65 24 4.95 24.45 4.5 24.9 4 25.6 4 L38.4 4 Q39.05 4 39.55 4.5 40 4.95 40 5.65 40 6.35 39.55 6.85 L33.15 13.5 Q32.65 14 32 14 31.3 14 30.85 13.5 M33 30 L34 29.9 34 30 35 33 38 33 36.5 28.5 Q38 27.05 38 25 38 22.95 36.5 21.45 35.05 20 33 20 L27 20 27 33 30 33 30 30 33 30 M30 27 L30 23 33 23 Q33.85 23 34.4 23.55 35 24.15 35 25 35 25.85 34.4 26.4 33.85 27 33.05 27 L30 27"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1,6 @@
|
||||
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<defs/>
|
||||
<g>
|
||||
<path stroke="none" fill="#FFFFFF" d="M43 50 Q43 52.5 39.75 54.25 36.55 56 32 56 27.5 56 24.25 54.25 21 52.5 21 50 L21 47.9 Q17.8 46.55 15 44.3 8 38.7 8 30.65 L8 30.1 8 29.55 8 29 8 28.5 8 28.1 8 27.95 8 27.4 Q8 19.4 15 13.65 17.8 11.4 21 10.1 L21 10.35 Q21 12.25 22.25 13.5 L22.75 14 Q19.85 15.15 17.4 17.1 L17.45 17.1 Q12.15 21.4 12 27.4 12.1 33.45 17.4 37.65 L21.25 40.15 Q21 40.8 21 41.65 21 43.5 22.25 44.85 L22.3 44.95 28.7 51.6 Q30 53 32 53 33.85 53.05 35.3 51.65 L35.3 51.6 41.7 44.95 41.8 44.85 Q43 43.5 43 41.65 L42.8 40.15 46.55 37.7 46.6 37.65 Q51.9 33.4 52 27.4 51.85 21.4 46.55 17.1 44.1 15.15 41.3 14 L41.7 13.6 Q43 12.35 43 10.35 L43 10.1 Q46.2 11.4 48.95 13.65 56 19.4 56 27.4 L56 27.95 56 28.1 56 28.5 56 29 56 29.55 56 30.1 56 30.65 Q56 38.7 48.95 44.3 46.2 46.55 43 47.9 L43 50 M44.15 19 Q47.7 22 48 25.95 L48 26.05 Q47.7 30 44.2 32.9 L44 33.05 Q39.35 36.75 32.8 37 L31.2 37 Q24.55 36.75 19.8 32.95 L19.7 32.9 Q16.3 30 16 26.1 L16 26.05 Q16.25 22 19.85 19 L19.95 18.9 Q24.7 15.2 31.2 15 L32.8 15 Q39.45 15.25 44.2 19 L44.15 19 M30 27 L30 23 33 23 Q33.85 23 34.4 23.55 35 24.15 35 25 35 25.85 34.4 26.4 33.85 27 33.05 27 L30 27 M33 30 L34 29.9 34 30 35 33 38 33 36.5 28.5 Q38 27.05 38 25 38 22.95 36.5 21.45 35.05 20 33 20 L27 20 27 33 30 33 30 30 33 30 M30.85 2.5 Q31.3 2 32 2 32.65 2 33.15 2.5 L39.55 9.15 Q40 9.65 40 10.35 40 11.05 39.55 11.5 39.05 12 38.4 12 L25.6 12 Q24.9 12 24.45 11.5 24 11.05 24 10.35 24 9.65 24.45 9.15 L30.85 2.5 M30.85 49.5 L24.45 42.85 Q24 42.35 24 41.65 L24.05 41.3 24.45 40.5 Q24.9 40 25.6 40 L38.4 40 Q39.05 40 39.55 40.5 L40 41.3 40 41.65 Q40 42.35 39.55 42.85 L33.15 49.5 Q32.65 50 32 50 31.3 50 30.85 49.5"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
@@ -0,0 +1,6 @@
|
||||
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<defs/>
|
||||
<g>
|
||||
<path stroke="none" fill="#FFFFFF" d="M43 50 Q43 52.5 39.75 54.25 36.55 56 32 56 27.5 56 24.25 54.25 21 52.5 21 50 L21 47.9 Q17.8 46.55 15 44.3 8 38.7 8 30.65 L8 30.1 8 29.55 8 29 8 28.5 8 28.1 8 27.95 8 27.4 Q8 19.4 15 13.65 18.5 10.85 22.75 9.45 L26.15 12.95 Q21.25 14.05 17.4 17.1 L17.45 17.1 Q12.15 21.4 12 27.4 12.1 33.45 17.4 37.65 23.45 42.5 32 42.5 40.55 42.5 46.55 37.7 L46.6 37.65 Q51.9 33.4 52 27.4 51.85 21.4 46.55 17.1 42.75 14.05 37.9 12.95 L41.25 9.45 Q45.5 10.85 48.95 13.65 56 19.4 56 27.4 L56 27.95 56 28.1 56 28.5 56 29 56 29.55 56 30.1 56 30.65 Q56 38.7 48.95 44.3 46.2 46.55 43 47.9 L43 50 M44.15 19 Q47.7 22 48 25.95 L48 26.05 Q47.7 30 44.2 32.9 L44 33.05 Q39.05 37 32 37 24.85 37 19.8 32.95 L19.7 32.9 Q16.3 30 16 26.1 L16 26.05 Q16.25 22 19.85 19 L19.95 18.9 Q23.65 16.05 28.4 15.3 L28.7 15.6 Q30 17 32 17 33.85 17.05 35.3 15.65 L35.3 15.6 35.6 15.3 Q40.5 16.05 44.2 19 L44.15 19 M30.85 13.5 L24.45 6.85 Q24 6.35 24 5.65 24 4.95 24.45 4.5 24.9 4 25.6 4 L38.4 4 Q39.05 4 39.55 4.5 40 4.95 40 5.65 40 6.35 39.55 6.85 L33.15 13.5 Q32.65 14 32 14 31.3 14 30.85 13.5 M33 30 L34 29.9 34 30 35 33 38 33 36.5 28.5 Q38 27.05 38 25 38 22.95 36.5 21.45 35.05 20 33 20 L27 20 27 33 30 33 30 30 33 30 M30 27 L30 23 33 23 Q33.85 23 34.4 23.55 35 24.15 35 25 35 25.85 34.4 26.4 33.85 27 33.05 27 L30 27"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1,6 @@
|
||||
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<defs/>
|
||||
<g>
|
||||
<path stroke="none" fill="#FFFFFF" d="M43 50 Q43 52.5 39.75 54.25 36.55 56 32 56 27.5 56 24.25 54.25 21 52.5 21 50 L21 47.9 Q17.8 46.55 15 44.3 8 38.7 8 30.65 L8 30.1 8 29.55 8 29 8 28.5 8 28.1 8 27.95 8 27.4 Q8 19.4 15 13.65 17.8 11.4 21 10.1 L21 10.35 Q21 12.25 22.25 13.5 L22.75 14 Q19.85 15.15 17.4 17.1 L17.45 17.1 Q12.15 21.4 12 27.4 12.1 33.45 17.4 37.65 L21.25 40.15 Q21 40.8 21 41.65 21 43.5 22.25 44.85 L22.3 44.95 28.7 51.6 Q30 53 32 53 33.85 53.05 35.3 51.65 L35.3 51.6 41.7 44.95 41.8 44.85 Q43 43.5 43 41.65 L42.8 40.15 46.55 37.7 46.6 37.65 Q51.9 33.4 52 27.4 51.85 21.4 46.55 17.1 44.1 15.15 41.3 14 L41.7 13.6 Q43 12.35 43 10.35 L43 10.1 Q46.2 11.4 48.95 13.65 56 19.4 56 27.4 L56 27.95 56 28.1 56 28.5 56 29 56 29.55 56 30.1 56 30.65 Q56 38.7 48.95 44.3 46.2 46.55 43 47.9 L43 50 M44.15 19 Q47.7 22 48 25.95 L48 26.05 Q47.7 30 44.2 32.9 L44 33.05 Q39.35 36.75 32.8 37 L31.2 37 Q24.55 36.75 19.8 32.95 L19.7 32.9 Q16.3 30 16 26.1 L16 26.05 Q16.25 22 19.85 19 L19.95 18.9 Q24.7 15.2 31.2 15 L32.8 15 Q39.45 15.25 44.2 19 L44.15 19 M30 27 L30 23 33 23 Q33.85 23 34.4 23.55 35 24.15 35 25 35 25.85 34.4 26.4 33.85 27 33.05 27 L30 27 M33 30 L34 29.9 34 30 35 33 38 33 36.5 28.5 Q38 27.05 38 25 38 22.95 36.5 21.45 35.05 20 33 20 L27 20 27 33 30 33 30 30 33 30 M30.85 2.5 Q31.3 2 32 2 32.65 2 33.15 2.5 L39.55 9.15 Q40 9.65 40 10.35 40 11.05 39.55 11.5 39.05 12 38.4 12 L25.6 12 Q24.9 12 24.45 11.5 24 11.05 24 10.35 24 9.65 24.45 9.15 L30.85 2.5 M30.85 49.5 L24.45 42.85 Q24 42.35 24 41.65 L24.05 41.3 24.45 40.5 Q24.9 40 25.6 40 L38.4 40 Q39.05 40 39.55 40.5 L40 41.3 40 41.65 Q40 42.35 39.55 42.85 L33.15 49.5 Q32.65 50 32 50 31.3 50 30.85 49.5"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
@@ -0,0 +1,6 @@
|
||||
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<defs/>
|
||||
<g>
|
||||
<path stroke="none" fill="#FFFFFF" d="M43 50 Q43 52.5 39.75 54.25 36.55 56 32 56 27.5 56 24.25 54.25 21 52.5 21 50 L21 47.9 Q17.8 46.55 15 44.3 8 38.7 8 30.65 L8 30.1 8 29.55 8 29 8 28.5 8 28.1 8 27.95 8 27.4 Q8 19.4 15 13.65 18.5 10.85 22.75 9.45 L26.15 12.95 Q21.25 14.05 17.4 17.1 L17.45 17.1 Q12.15 21.4 12 27.4 12.1 33.45 17.4 37.65 23.45 42.5 32 42.5 40.55 42.5 46.55 37.7 L46.6 37.65 Q51.9 33.4 52 27.4 51.85 21.4 46.55 17.1 42.75 14.05 37.9 12.95 L41.25 9.45 Q45.5 10.85 48.95 13.65 56 19.4 56 27.4 L56 27.95 56 28.1 56 28.5 56 29 56 29.55 56 30.1 56 30.65 Q56 38.7 48.95 44.3 46.2 46.55 43 47.9 L43 50 M44.15 19 Q47.7 22 48 25.95 L48 26.05 Q47.7 30 44.2 32.9 L44 33.05 Q39.05 37 32 37 24.85 37 19.8 32.95 L19.7 32.9 Q16.3 30 16 26.1 L16 26.05 Q16.25 22 19.85 19 L19.95 18.9 Q23.65 16.05 28.4 15.3 L28.7 15.6 Q30 17 32 17 33.85 17.05 35.3 15.65 L35.3 15.6 35.6 15.3 Q40.5 16.05 44.2 19 L44.15 19 M30.85 13.5 L24.45 6.85 Q24 6.35 24 5.65 24 4.95 24.45 4.5 24.9 4 25.6 4 L38.4 4 Q39.05 4 39.55 4.5 40 4.95 40 5.65 40 6.35 39.55 6.85 L33.15 13.5 Q32.65 14 32 14 31.3 14 30.85 13.5 M33 30 L34 29.9 34 30 35 33 38 33 36.5 28.5 Q38 27.05 38 25 38 22.95 36.5 21.45 35.05 20 33 20 L27 20 27 33 30 33 30 30 33 30 M30 27 L30 23 33 23 Q33.85 23 34.4 23.55 35 24.15 35 25 35 25.85 34.4 26.4 33.85 27 33.05 27 L30 27"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1,6 @@
|
||||
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<defs/>
|
||||
<g>
|
||||
<path stroke="none" fill="#FFFFFF" d="M43 50 Q43 52.5 39.75 54.25 36.55 56 32 56 27.5 56 24.25 54.25 21 52.5 21 50 L21 47.9 Q17.8 46.55 15 44.3 8 38.7 8 30.65 L8 30.1 8 29.55 8 29 8 28.5 8 28.1 8 27.95 8 27.4 Q8 19.4 15 13.65 17.8 11.4 21 10.1 L21 10.35 Q21 12.25 22.25 13.5 L22.75 14 Q19.85 15.15 17.4 17.1 L17.45 17.1 Q12.15 21.4 12 27.4 12.1 33.45 17.4 37.65 L21.25 40.15 Q21 40.8 21 41.65 21 43.5 22.25 44.85 L22.3 44.95 28.7 51.6 Q30 53 32 53 33.85 53.05 35.3 51.65 L35.3 51.6 41.7 44.95 41.8 44.85 Q43 43.5 43 41.65 L42.8 40.15 46.55 37.7 46.6 37.65 Q51.9 33.4 52 27.4 51.85 21.4 46.55 17.1 44.1 15.15 41.3 14 L41.7 13.6 Q43 12.35 43 10.35 L43 10.1 Q46.2 11.4 48.95 13.65 56 19.4 56 27.4 L56 27.95 56 28.1 56 28.5 56 29 56 29.55 56 30.1 56 30.65 Q56 38.7 48.95 44.3 46.2 46.55 43 47.9 L43 50 M44.15 19 Q47.7 22 48 25.95 L48 26.05 Q47.7 30 44.2 32.9 L44 33.05 Q39.35 36.75 32.8 37 L31.2 37 Q24.55 36.75 19.8 32.95 L19.7 32.9 Q16.3 30 16 26.1 L16 26.05 Q16.25 22 19.85 19 L19.95 18.9 Q24.7 15.2 31.2 15 L32.8 15 Q39.45 15.25 44.2 19 L44.15 19 M30 27 L30 23 33 23 Q33.85 23 34.4 23.55 35 24.15 35 25 35 25.85 34.4 26.4 33.85 27 33.05 27 L30 27 M33 30 L34 29.9 34 30 35 33 38 33 36.5 28.5 Q38 27.05 38 25 38 22.95 36.5 21.45 35.05 20 33 20 L27 20 27 33 30 33 30 30 33 30 M30.85 2.5 Q31.3 2 32 2 32.65 2 33.15 2.5 L39.55 9.15 Q40 9.65 40 10.35 40 11.05 39.55 11.5 39.05 12 38.4 12 L25.6 12 Q24.9 12 24.45 11.5 24 11.05 24 10.35 24 9.65 24.45 9.15 L30.85 2.5 M30.85 49.5 L24.45 42.85 Q24 42.35 24 41.65 L24.05 41.3 24.45 40.5 Q24.9 40 25.6 40 L38.4 40 Q39.05 40 39.55 40.5 L40 41.3 40 41.65 Q40 42.35 39.55 42.85 L33.15 49.5 Q32.65 50 32 50 31.3 50 30.85 49.5"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |