Skip to content
Snippets Groups Projects
Commit 77408fa4 authored by Florian Schröder's avatar Florian Schröder
Browse files

Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	cooperative_cuisine/pygame_2d_vis/gui.py
parents ae046770 28a7e4ec
No related branches found
No related tags found
1 merge request!110V1.2.0 changes
Pipeline #60350 passed
......@@ -1253,7 +1253,7 @@ class PyGameGUI:
layout_path = self.layout_file_paths_dict[layout_name]
max_size = layout_display_height * 0.9
factor = 2
factor = 6
layout_surface = layout_thumbnail(layout_path, vis, max_size * factor, item_lookup, layout_hashes)
......@@ -2083,7 +2083,13 @@ class PyGameGUI:
"translations.selected_layout", text_kwargs={"layout": self.selected_layout.replace(".layout", "")}
)
if self.layout_surfaces:
new_surf = pygame.transform.scale_by(self.layout_surfaces[self.selected_layout], 0.8)
print(self.selected_layout_label.rect)
# between label and start button
max_target_height = ((self.window_height // 2) - self.buttons_height - (self.buttons_height // 2)) * 0.8
new_surf = pygame.transform.scale_by(self.layout_surfaces[self.selected_layout],
max_target_height / self.layout_surfaces[
self.selected_layout].get_height())
self.preview_layout_image.set_dimensions(new_surf.get_size())
self.preview_layout_image.set_image(new_surf)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment