Skip to content

Commit 630c2f1

Browse files
committed
FIX: Inline tool icons change size when zooming in or out and scaled tool icons are enabled
git-svn-id: svn://tron.homeunix.org/simutrans/simutrans/trunk@11892 8aca7d54-2c30-db11-9de9-000461428c89
1 parent 2139bc5 commit 630c2f1

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

simutrans/history.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
CHG: (poppo) extended selection of way resp. their obj with CNTRL and SHIFT and pipette tool
6363
ADD: new settings cost_kw_per_credit (default was 512) to chaneg revenue from power. Smaller numbers more income
6464
FIX: Corrected format of transformer tool icon tooltip
65+
FIX: Inline tool icons change size when zooming in or out and scaled tool icons are enabled
6566

6667

6768
Release of 124.3.1 (r11671 on 5-Apr-2025):

src/simutrans/gui/components/gui_flowtext.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,12 @@ scr_size gui_flowtext_intern_t::output(scr_coord offset, bool doit, bool return_
603603
}
604604

605605
if ( doit ) {
606+
// display_base_img calls display_color_img if zoom level is 1:1;
607+
// this will display the scaled tool image, not the original one
608+
// and therefore causes graphical glitches when zooming in/out.
609+
// Force displaying non-scaled tool image instead.
610+
display_fit_img_to_width(image->id, xw);
611+
606612
display_base_img(image->id, offset.x + xpos + 1 - xoff + D_MARGIN_LEFT, offset.y + ypos + yoff, 0, false, false);
607613
}
608614
xpos += xw+2;

0 commit comments

Comments
 (0)