Skip to content

Commit

Permalink
Improve #47 Chevk MainWindow lower off-screen values too.
Browse files Browse the repository at this point in the history
  • Loading branch information
fghber committed Mar 24, 2017
1 parent 74e196a commit 17b572e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions YAPA/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ void MainWindow_Loaded(object sender, RoutedEventArgs e)
var screenChanged = (currentScreen.WorkingArea.Height != Properties.Settings.Default.CurrentScreenHeight ||
currentScreen.WorkingArea.Width != Properties.Settings.Default.CurrentScreenWidth);

var offScreen = (currentScreen.WorkingArea.Height < Properties.Settings.Default.WindowTop ||
currentScreen.WorkingArea.Width < Properties.Settings.Default.WindowLeft);
var offScreen = (Properties.Settings.Default.WindowTop < 0 || Properties.Settings.Default.WindowTop > currentScreen.WorkingArea.Height ||
Properties.Settings.Default.WindowLeft < 0 || Properties.Settings.Default.WindowLeft > currentScreen.WorkingArea.Width);

// default position only for first run or when screen size changes
// position the clock at top / right, primary screen
Expand Down

0 comments on commit 17b572e

Please sign in to comment.