Save games in higher resolution - closes #7
This commit is contained in:
@@ -6,6 +6,10 @@ template game : Box {
|
||||
halign: center;
|
||||
valign: start;
|
||||
|
||||
Adw.Clamp {
|
||||
maximum-size: 200;
|
||||
Box {
|
||||
orientation: vertical;
|
||||
Button cover_button {
|
||||
Picture cover {
|
||||
width-request: 200;
|
||||
@@ -23,11 +27,6 @@ template game : Box {
|
||||
"flat",
|
||||
]
|
||||
}
|
||||
|
||||
Adw.Clamp {
|
||||
maximum-size: 200;
|
||||
|
||||
Box {
|
||||
Overlay overlay {
|
||||
[overlay]
|
||||
Revealer play_revealer {
|
||||
|
||||
@@ -67,6 +67,8 @@ template CartridgesWindow : Adw.ApplicationWindow {
|
||||
margin-top: 24;
|
||||
margin-bottom: 24;
|
||||
|
||||
Adw.Clamp {
|
||||
maximum-size: 200;
|
||||
Picture overview_cover {
|
||||
halign: end;
|
||||
valign: start;
|
||||
@@ -77,6 +79,7 @@ template CartridgesWindow : Adw.ApplicationWindow {
|
||||
"card",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Box {
|
||||
orientation: vertical;
|
||||
|
||||
@@ -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"),
|
||||
|
||||
@@ -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()))
|
||||
|
||||
Reference in New Issue
Block a user