Fixed 'scale to fit' functionality of WidgetImage

This commit is contained in:
2025-12-15 16:54:28 +02:00
parent c626578557
commit 17f73211a9
3 changed files with 57 additions and 4 deletions

View File

@@ -87,6 +87,10 @@ SDL_Rect surface_align(const SDL_Surface* base, const SDL_Surface* applied,
return align;
}
// These are set in order to handle scaled blits
align.w = applied->w;
align.h = applied->h;
if (nullptr == hint_external)
{
hint = SDL_Rect{.x = 0, .y = 0, .w = applied->w, .h = applied->h};