Skip to content
Closed
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
28c9183
Preview implementation
Crykon Aug 14, 2026
1cb9c27
Remove pycache files
WillyJL Aug 24, 2026
0dc8ef8
Merge remote-tracking branch 'origin/main' into origin-pr-285
WillyJL Aug 24, 2026
b7a977f
Fix crash when closing popup
WillyJL Aug 24, 2026
bc9c569
Merge branch 'WillyJL:main' into preview
Crykon Aug 25, 2026
76d9ada
Add files via upload
Crykon Aug 25, 2026
8810b7e
Add files via upload
Crykon Aug 25, 2026
4e91f0b
Add files via upload
Crykon Aug 25, 2026
bd9fc17
Delete structs.py
Crykon Aug 25, 2026
8b33108
Delete gui.py
Crykon Aug 25, 2026
8bd3a18
Preview implementation change
Crykon Aug 25, 2026
1cfed1c
Preview implementation change
Crykon Aug 25, 2026
b405e5f
Merge remote-tracking branch 'origin/main' into origin-pr-285
WillyJL Aug 25, 2026
f53d33d
Fix merge
WillyJL Aug 25, 2026
15fbff0
Use old_id for consistency
WillyJL Aug 25, 2026
417455f
Get enums directly
WillyJL Aug 25, 2026
6019925
Move preview_dir out of the loop
WillyJL Aug 25, 2026
498fa0e
Remove compatibility with prior PR implementation
WillyJL Aug 25, 2026
ac6f829
Rename dir as-is when changing ID
WillyJL Aug 25, 2026
3ed7329
Some more unloads/cancels
WillyJL Aug 25, 2026
9375c5d
Don't delete previews when resetting cover image
WillyJL Aug 25, 2026
2ff0514
Merge remote-tracking branch 'origin/main' into origin-pr-285
WillyJL Aug 25, 2026
4717e50
Show total downloading count, play better with api.py ratelimits
WillyJL Aug 25, 2026
95c7a1a
Show compressing status too
WillyJL Aug 25, 2026
19eee55
Improve preview scaling and error display
WillyJL Aug 25, 2026
9e1754f
Add opt-in setting
WillyJL Aug 25, 2026
cb027f0
Update changelog
WillyJL Aug 25, 2026
c824f1c
Handle case where downloaded previews are removed/replaced on F95zone
WillyJL Aug 25, 2026
1881253
Merge branch 'WillyJL:main' into previewV2
Crykon Aug 26, 2026
6e21b85
Previews proper width to height ratio
Crykon Aug 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions modules/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -2297,8 +2297,8 @@ def select_callback(selected):
# the row in a child with an explicit horizontal bar.
# Without a child, ImGui clips same-line items at the
# popup boundary and the parent only scrolls vertically.
preview_width = max(self.scaled(240), (out_width - imgui.style.item_spacing.x) / 2)
preview_height = preview_width / (16 / 9)
max_preview_width = max(self.scaled(240), (out_width - imgui.style.item_spacing.x) / 2)
max_preview_height = self.scaled(260)
horizontal_flags = (
imgui.WINDOW_HORIZONTAL_SCROLLING_BAR |
imgui.WINDOW_ALWAYS_HORIZONTAL_SCROLLBAR |
Expand All @@ -2307,18 +2307,29 @@ def select_callback(selected):
imgui.begin_child(
"###game_previews_gallery",
width=out_width,
height=preview_height + 2 * imgui.style.window_padding.y,
height=max_preview_height + 2 * imgui.style.window_padding.y,
flags=horizontal_flags,
)
first = True
for preview in game.preview_images:
if not first:
imgui.same_line()
# Fit each preview inside a bounding box without
# cropping or stretching portrait/tall images.
aspect_ratio = (
preview.width / preview.height
if preview.loaded and preview.width > 0 and preview.height > 0
else 16 / 9
)
preview_width = max_preview_width
preview_height = preview_width / aspect_ratio
if preview_height > max_preview_height:
preview_height = max_preview_height
preview_width = preview_height * aspect_ratio
if preview.error:
self.draw_game_image_error(game, preview, preview_width, preview_height)
else:
crop = preview.crop_to_ratio(preview_width / preview_height, fit=globals.settings.fit_images)
preview.render(preview_width, preview_height, *crop, rounding=rounding)
preview.render(preview_width, preview_height, rounding=rounding)
first = False
imgui.end_child()
imgui.push_text_wrap_pos()
Expand Down