Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaedus committed Jun 7, 2023
1 parent e37aa29 commit 95110c1
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 18 deletions.
9 changes: 2 additions & 7 deletions src/app/components/details/album_header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ impl AlbumHeaderWidget {
self.imp().info_button.connect_clicked(move |_| f());
}


pub fn connect_artist_clicked<F>(&self, f: F)
where
F: Fn() + 'static,
Expand Down Expand Up @@ -129,12 +128,8 @@ impl AlbumHeaderWidget {
};
let tooltip_text = Some(translated_tooltip.as_str());

self.imp()
.play_button
.set_icon_name(playback_icon);
self.imp()
.play_button.
set_tooltip_text(tooltip_text);
self.imp().play_button.set_icon_name(playback_icon);
self.imp().play_button.set_tooltip_text(tooltip_text);
}

pub fn set_artwork(&self, art: &gdk_pixbuf::Pixbuf) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/details/details.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ impl Details {
}

fn update_playing(&self, is_playing: bool) {
if !self.model.playlist_is_playing() || !self.model.is_playing(){
if !self.model.playlist_is_playing() || !self.model.is_playing() {
self.widget.set_playing(false);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/playlist_details/playlist_details.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use crate::app::components::{
};
use crate::app::dispatch::Worker;
use crate::app::loader::ImageLoader;
use crate::app::state::{SelectionEvent, PlaybackEvent};
use crate::app::state::{PlaybackEvent, SelectionEvent};
use crate::app::{AppEvent, BrowserEvent};
use libadwaita::subclass::prelude::BinImpl;

Expand Down
4 changes: 2 additions & 2 deletions src/app/components/playlist_details/playlist_details_model.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
use gio::prelude::*;
use gio::SimpleActionGroup;
use std::cell::Ref;
use std::ops::Deref;
use std::rc::Rc;
use std::cell::Ref;

use crate::api::SpotifyApiError;
use crate::app::AppState;
use crate::app::components::{labels, PlaylistModel};
use crate::app::models::*;
use crate::app::state::SelectionContext;
use crate::app::state::{BrowserAction, PlaybackAction, SelectionAction, SelectionState};
use crate::app::AppState;
use crate::app::{ActionDispatcher, AppAction, AppModel, BatchQuery, SongsSource};

pub struct PlaylistDetailsModel {
Expand Down
10 changes: 3 additions & 7 deletions src/app/components/playlist_details/playlist_header.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use gettextrs::gettext;
use crate::app::components::display_add_css_provider;
use gettextrs::gettext;
use gtk::prelude::*;
use gtk::subclass::prelude::*;
use gtk::{glib, CompositeTemplate};
Expand Down Expand Up @@ -144,12 +144,8 @@ impl PlaylistHeaderWidget {
};
let tooltip_text = Some(translated_tooltip.as_str());

self.imp()
.play_button
.set_icon_name(playback_icon);
self.imp()
.play_button.
set_tooltip_text(tooltip_text);
self.imp().play_button.set_icon_name(playback_icon);
self.imp().play_button.set_tooltip_text(tooltip_text);
}

pub fn set_centered(&self) {
Expand Down

0 comments on commit 95110c1

Please sign in to comment.