Skip to main content
Topic: [patch] Fix image resizing problem in builders (Read 1656 times) previous topic - next topic

[patch] Fix image resizing problem in builders

Currently, the builders (factory builder, curiosity builders, etc.) show images which scale with the current zoom factor of the main view. Sometimes the image enlarges beyond the window's bottom boundary, and sometimes the image becomes broken (split into 4 pieces) when shrunk to a small size.

The attached patch fixes this problem by changing gui_image_t::zeichnen() to use display_base_img() instead of display_color_img(), the latter of which will always show images in rezoomed scale, while the former will not.

I have checked that all code blocks which use gui_image_t need not (like small icons) or should not (like station layout dialog) use a scaled image. Besides, IMHO images for the GUI should not scale with main view's zoom factor.

I have also fixed some alignment issues in the builder dialogs so that they now look more tidy. The width of the tab panel will be automatically adjusted so that, for paksets with larger tile width, the image will still have sufficient width to render under the tab panel.