- Notifications
You must be signed in to change notification settings - Fork5
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
ethanndickson commentedJun 13, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
// Adjust if the window goes off the right edge of the display. | ||
if (x + width > workArea.X + workArea.Width) x = workArea.X + workArea.Width - width; | ||
int x, y; |
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.
The previous calculations had some hardcoded plus or minus10
as a padding, shouldn't we do something similar to avoid it directly touching the taskbar or the side of the screen?
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 useworkArea.Height
here, the comment doesn't do a very good job explaining why we wouldn't prefer to always use the workArea.Height.
@@ -338,4 +317,70 @@ public struct POINT | |||
public int Y; | |||
} | |||
} |
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.
} | |
} | |
Uh oh!
There was an error while loading.Please reload this page.
Closes:#119