File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -226,6 +226,26 @@ private void Init()
226226 Width = Config . Instance . DialogWidth ?? Width ;
227227 Height = Config . Instance . DialogHeight ?? Height ;
228228
229+ if ( Top < SystemParameters . VirtualScreenTop )
230+ {
231+ Top = SystemParameters . VirtualScreenTop ;
232+ }
233+
234+ if ( Left < SystemParameters . VirtualScreenLeft )
235+ {
236+ Left = SystemParameters . VirtualScreenLeft ;
237+ }
238+
239+ if ( Left + Width > SystemParameters . VirtualScreenLeft + SystemParameters . VirtualScreenWidth )
240+ {
241+ Left = SystemParameters . VirtualScreenWidth + SystemParameters . VirtualScreenLeft - Width ;
242+ }
243+
244+ if ( Top + Height > SystemParameters . VirtualScreenTop + SystemParameters . VirtualScreenHeight )
245+ {
246+ Top = SystemParameters . VirtualScreenHeight + SystemParameters . VirtualScreenTop - Height ;
247+ }
248+
229249 WindowState = Config . Instance . DialogMaximized ? WindowState . Maximized : WindowState . Normal ;
230250
231251 FirstColumn . Width = Config . Instance . GridFirstColumnWidth ;
You can’t perform that action at this time.
0 commit comments