File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -227,6 +227,7 @@ private static class Symbols
227227
228228 public bool normalTextMode = true ; // Standard text
229229 public bool TrainDrivingUpdating = false ;
230+ public int CurrentWidth = 0 ;
230231 public static bool MonoFont ;
231232 public static bool FontChanged ;
232233 public static bool FontToBold ;
@@ -489,6 +490,15 @@ private void ModifyWindowSize()
489490 var newHeight = ( int ) MathHelper . Clamp ( desiredHeight , ( normalTextMode ? WindowHeightMin : 100 ) , WindowHeightMax ) ;
490491 var newWidth = ( int ) MathHelper . Clamp ( desiredWidth , ( normalTextMode ? WindowWidthMin : 100 ) , WindowWidthMax ) ;
491492
493+ // Stable window width
494+ if ( normalTextMode ) CurrentWidth = 0 ; // Reset CurrentWidth value
495+ if ( ! normalTextMode && newWidth != CurrentWidth )
496+ {
497+ var newWidthHigher = newWidth > CurrentWidth ;
498+ newWidth = newWidthHigher ? newWidth : CurrentWidth ;
499+ CurrentWidth = newWidthHigher ? newWidth : CurrentWidth ;
500+ }
501+
492502 // Move the dialog up if we're expanding it, or down if not; this keeps the center in the same place.
493503 var newTop = Location . Y + ( Location . Height - newHeight ) / 2 ;
494504
You can’t perform that action at this time.
0 commit comments