Save games in higher resolution - closes #7
This commit is contained in:
@@ -6,6 +6,10 @@ template game : Box {
|
|||||||
halign: center;
|
halign: center;
|
||||||
valign: start;
|
valign: start;
|
||||||
|
|
||||||
|
Adw.Clamp {
|
||||||
|
maximum-size: 200;
|
||||||
|
Box {
|
||||||
|
orientation: vertical;
|
||||||
Button cover_button {
|
Button cover_button {
|
||||||
Picture cover {
|
Picture cover {
|
||||||
width-request: 200;
|
width-request: 200;
|
||||||
@@ -23,11 +27,6 @@ template game : Box {
|
|||||||
"flat",
|
"flat",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
Adw.Clamp {
|
|
||||||
maximum-size: 200;
|
|
||||||
|
|
||||||
Box {
|
|
||||||
Overlay overlay {
|
Overlay overlay {
|
||||||
[overlay]
|
[overlay]
|
||||||
Revealer play_revealer {
|
Revealer play_revealer {
|
||||||
|
|||||||
@@ -67,6 +67,8 @@ template CartridgesWindow : Adw.ApplicationWindow {
|
|||||||
margin-top: 24;
|
margin-top: 24;
|
||||||
margin-bottom: 24;
|
margin-bottom: 24;
|
||||||
|
|
||||||
|
Adw.Clamp {
|
||||||
|
maximum-size: 200;
|
||||||
Picture overview_cover {
|
Picture overview_cover {
|
||||||
halign: end;
|
halign: end;
|
||||||
valign: start;
|
valign: start;
|
||||||
@@ -77,6 +79,7 @@ template CartridgesWindow : Adw.ApplicationWindow {
|
|||||||
"card",
|
"card",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Box {
|
Box {
|
||||||
orientation: vertical;
|
orientation: vertical;
|
||||||
|
|||||||
@@ -75,8 +75,13 @@ def create_details_window(parent_widget, game_id = None):
|
|||||||
)
|
)
|
||||||
cover_overlay.add_overlay(cover_button)
|
cover_overlay.add_overlay(cover_button)
|
||||||
|
|
||||||
|
cover_clamp = Adw.Clamp(
|
||||||
|
maximum_size = 200,
|
||||||
|
child = cover_overlay,
|
||||||
|
)
|
||||||
|
|
||||||
cover_group = Adw.PreferencesGroup()
|
cover_group = Adw.PreferencesGroup()
|
||||||
cover_group.add(cover_overlay)
|
cover_group.add(cover_clamp)
|
||||||
|
|
||||||
title_group = Adw.PreferencesGroup(
|
title_group = Adw.PreferencesGroup(
|
||||||
title = _("Title"),
|
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")
|
cover_path = os.path.join(covers_dir, game_id + ".dat")
|
||||||
|
|
||||||
if pixbuf == None:
|
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 = open((cover_path), "wb")
|
||||||
open_file.write(bytes(pixbuf.get_pixels()))
|
open_file.write(bytes(pixbuf.get_pixels()))
|
||||||
|
|||||||
Reference in New Issue
Block a user