Skip to content
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

Fix screen clamping logic #3255

Merged
merged 1 commit into from
Jan 4, 2021
Merged

Conversation

HebaruSan
Copy link
Member

Problem

On certain multi-monitor configurations (mine looks like image), the tray icon menu appears offscreen (this is monitor 1, the one on the lower right):

image

There may also be some related problems with the entire window appearing offscreen, but I haven't observed that directly.

Cause

We have logic to "clamp" the menu's area to be on-screen (see #2587, shared with the window position restoration code, see #2677), but currently the Top and Left properties are switched, so the position won't get adjusted if the Y value is greater than the Left position of the screen.

Changes

Now we compare X to Left and Y to Top, and the menu appears onscreen:

image

@HebaruSan HebaruSan added Bug Something is not working as intended Easy This is easy to fix GUI Issues affecting the interactive GUI Pull request labels Jan 2, 2021
@HebaruSan HebaruSan merged commit c1f6f15 into KSP-CKAN:master Jan 4, 2021
@HebaruSan HebaruSan deleted the fix/tray-menu branch January 4, 2021 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is not working as intended Easy This is easy to fix GUI Issues affecting the interactive GUI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants