Compare commits

..

2 commits

Author SHA1 Message Date
6975148163 make volume bar gray if muted 2024-11-23 15:24:33 +01:00
b1eb01effc silence error 2024-11-23 15:14:18 +01:00
2 changed files with 12 additions and 1 deletions

View file

@ -44,6 +44,10 @@ toolbarview#main {
min-height: 15px; min-height: 15px;
} }
.mute #volume-scale trough highlight {
background-color: oklch(from var(--accent-bg-color) l 0% h);
}
#play-queue listview { #play-queue listview {
background-color: rgba(0,0,0,0); background-color: rgba(0,0,0,0);
} }

View file

@ -176,7 +176,8 @@ mod imp {
// wipe state directory on init (gets rid of stale mpris cover art) // wipe state directory on init (gets rid of stale mpris cover art)
let state_home = audrey::globals::xdg_dirs().get_state_home(); let state_home = audrey::globals::xdg_dirs().get_state_home();
std::fs::remove_dir_all(state_home).expect("could not remove xdg state home"); // silence error (its okay if it does not exist)
let _ = std::fs::remove_dir_all(state_home);
if let Some(display) = gdk::Display::default() { if let Some(display) = gdk::Display::default() {
gtk::style_context_add_provider_for_display(&display, &self.css_provider, 420); gtk::style_context_add_provider_for_display(&display, &self.css_provider, 420);
@ -476,6 +477,12 @@ mod imp {
fn set_mute(&self, mute: bool) { fn set_mute(&self, mute: bool) {
self.mpv.set_property("mute", mute).unwrap(); self.mpv.set_property("mute", mute).unwrap();
if mute {
self.obj().add_css_class("mute");
} else {
self.obj().remove_css_class("mute");
}
} }
fn pause(&self) -> bool { fn pause(&self) -> bool {