Skip to content

Commit

Permalink
Black format media_controller.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rdbende committed Mar 9, 2024
1 parent fb240b8 commit 93a88ac
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions cozy/ui/media_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
COVER_SIZE = 46


@Gtk.Template.from_resource('/com/github/geigi/cozy/ui/media_controller.ui')
@Gtk.Template.from_resource("/com/github/geigi/cozy/ui/media_controller.ui")
class MediaController(Adw.BreakpointBin):
__gtype_name__ = "MediaController"

Expand Down Expand Up @@ -51,11 +51,17 @@ def __init__(self, main_window_builder: Gtk.Builder):
self.timer_button.set_popover(self.sleep_timer)

self.volume_button.set_icons(
["audio-volume-muted-symbolic", "audio-volume-high-symbolic",
"audio-volume-low-symbolic", "audio-volume-medium-symbolic"]
[
"audio-volume-muted-symbolic",
"audio-volume-high-symbolic",
"audio-volume-low-symbolic",
"audio-volume-medium-symbolic",
]
)

self._playback_control_view_model: PlaybackControlViewModel = inject.instance(PlaybackControlViewModel)
self._playback_control_view_model: PlaybackControlViewModel = inject.instance(
PlaybackControlViewModel
)
self._artwork_cache: ArtworkCache = inject.instance(ArtworkCache)
self._connect_view_model()
self._connect_widgets()
Expand Down Expand Up @@ -90,7 +96,9 @@ def _connect_widgets(self):
self.cover_img.set_cursor(Gdk.Cursor.new_from_name("pointer"))

def _set_cover_image(self, book: Book):
paintable = self._artwork_cache.get_cover_paintable(book, self.get_scale_factor(), COVER_SIZE)
paintable = self._artwork_cache.get_cover_paintable(
book, self.get_scale_factor(), COVER_SIZE
)
if paintable:
self.cover_img.set_from_paintable(paintable)
else:
Expand Down

0 comments on commit 93a88ac

Please sign in to comment.