File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,18 @@ public void Globalization()
91
91
State . Text = Locale . columnState ; // State column
92
92
}
93
93
94
+ private void AutoAdjustScreensize ( )
95
+ {
96
+ var screen = Screen . FromControl ( this ) ;
97
+ var screenSize = screen . Bounds . Size ;
98
+
99
+ if ( Width > screenSize . Width )
100
+ Width = screenSize . Width ;
101
+
102
+ if ( Height > screenSize . Height )
103
+ Height = screenSize . Height - 30 ; //Height -30 because of the Windows Task bar
104
+ }
105
+
94
106
public MainWindow ( )
95
107
{
96
108
// Uncomment lower line and add lang code to run localization test
@@ -109,6 +121,9 @@ public MainWindow()
109
121
110
122
// GUI localization
111
123
Globalization ( ) ;
124
+
125
+ //Adjust to current screensize if window is too big
126
+ AutoAdjustScreensize ( ) ;
112
127
}
113
128
114
129
public void InitializeSettings ( )
You can’t perform that action at this time.
0 commit comments