Improve variable names to match Code Style Guide (see #103)

This commit is contained in:
coderkun 2024-05-28 12:02:43 +02:00
commit 54fe825acf
6 changed files with 71 additions and 65 deletions

View file

@ -110,9 +110,9 @@ class PlaylistPanel(Adw.Bin):
# Get selected album
item = self._playlist_grid_model.get_item(position)
album = item.get_album()
id = album.get_id()
album_id = album.get_id()
self._selected_albums = [album]
self.emit('albumart', id)
self.emit('albumart', album_id)
# Show standalone album
if widget.get_model() == self._playlist_grid_selection_single:
@ -253,10 +253,10 @@ class PlaylistPanel(Adw.Bin):
return
# Skalierungswert für Breite und Höhe ermitteln
ratioW = float(size_width) / float(pixbuf.get_width())
ratioH = float(size_height) / float(pixbuf.get_height())
ratio_w = float(size_width) / float(pixbuf.get_width())
ratio_h = float(size_height) / float(pixbuf.get_height())
# Kleineren beider Skalierungswerte nehmen, nicht Hochskalieren
ratio = min(ratioW, ratioH)
ratio = min(ratio_w, ratio_h)
ratio = min(ratio, 1)
# Neue Breite und Höhe berechnen
width = int(math.floor(pixbuf.get_width() * ratio))