-
Notifications
You must be signed in to change notification settings - Fork 10
feat: calculate taskbar position and display on top of it #125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
App/Views/TrayWindow.xaml.cs
Outdated
| case TaskbarPosition.Bottom when tb.AutoHide: | ||
| // Auto-hide bottom bar sits under the workArea – use workArea, not bounds. | ||
| x = workArea.X + workArea.Width - panelSize.Width; | ||
| y = workArea.Y + workArea.Height - panelSize.Height - tb.Gap; | ||
| break; | ||
|
|
||
| // Adjust if the window goes off the top edge of the display (somehow). | ||
| if (y < workArea.Y) y = workArea.Y; | ||
| default: // right or bottom when not auto-hiding | ||
| x = workArea.X + workArea.Width - panelSize.Width; | ||
| y = bounds.Y + bounds.Height - panelSize.Height - tb.Gap; | ||
| break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get why we wouldn't just always use workArea.Height here, the comment doesn't do a very good job explaining why we wouldn't prefer to always use the workArea.Height.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could. It's the same thing in that scenario. I've simplified the logic to make it clearer.
5638bf1 to
c2a748e
Compare



Closes: #119