diff --git a/data/gtk/game.blp b/data/gtk/game.blp index fda2476..f08c441 100644 --- a/data/gtk/game.blp +++ b/data/gtk/game.blp @@ -6,28 +6,27 @@ template game : Box { halign: center; valign: start; - Button cover_button { - Picture cover { - width-request: 200; - height-request: 300; - hexpand: true; - vexpand: true; - - styles [ - "card", - ] - } - - styles [ - "card", - "flat", - ] - } - Adw.Clamp { maximum-size: 200; - Box { + orientation: vertical; + Button cover_button { + Picture cover { + width-request: 200; + height-request: 300; + hexpand: true; + vexpand: true; + + styles [ + "card", + ] + } + + styles [ + "card", + "flat", + ] + } Overlay overlay { [overlay] Revealer play_revealer { diff --git a/data/gtk/window.blp b/data/gtk/window.blp index 24fdf37..33f5b7d 100644 --- a/data/gtk/window.blp +++ b/data/gtk/window.blp @@ -67,15 +67,18 @@ template CartridgesWindow : Adw.ApplicationWindow { margin-top: 24; margin-bottom: 24; - Picture overview_cover { - halign: end; - valign: start; - width-request: 200; - height-request: 300; + Adw.Clamp { + maximum-size: 200; + Picture overview_cover { + halign: end; + valign: start; + width-request: 200; + height-request: 300; - styles [ - "card", - ] + styles [ + "card", + ] + } } Box { diff --git a/src/utils/create_details_window.py b/src/utils/create_details_window.py index 1d07e8c..6d25cf4 100644 --- a/src/utils/create_details_window.py +++ b/src/utils/create_details_window.py @@ -75,8 +75,13 @@ def create_details_window(parent_widget, game_id = None): ) cover_overlay.add_overlay(cover_button) + cover_clamp = Adw.Clamp( + maximum_size = 200, + child = cover_overlay, + ) + cover_group = Adw.PreferencesGroup() - cover_group.add(cover_overlay) + cover_group.add(cover_clamp) title_group = Adw.PreferencesGroup( title = _("Title"), diff --git a/src/utils/save_cover.py b/src/utils/save_cover.py index bf93fa8..c681313 100644 --- a/src/utils/save_cover.py +++ b/src/utils/save_cover.py @@ -31,7 +31,7 @@ def save_cover(game, parent_widget, file_path, pixbuf = None, game_id = None): cover_path = os.path.join(covers_dir, game_id + ".dat") if pixbuf == None: - pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(file_path, 200, 300, False) + pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(file_path, 600, 900, False) open_file = open((cover_path), "wb") open_file.write(bytes(pixbuf.get_pixels()))