Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
ibetitsmike wants to merge1 commit intomain
base:main
Choose a base branch
Loading
frommike/119-tray-window-location-improvements

Conversation

ibetitsmike
Copy link
Contributor

@ibetitsmikeibetitsmike commentedJun 11, 2025
edited
Loading

Closes:#119

@ethanndickson
Copy link
Member

ethanndickson commentedJun 13, 2025
edited
Loading

Does this account for opening it from the tray overflow? e.g. from:
i

EDIT: The Logitech app I use does this actually, I don't think I like it
image

What are the downsides of doing it on the cursor position?

@ibetitsmikeGraphite App
Copy link
ContributorAuthor

My idea was to actually draw it from the taskbar because otherwise it just leaves the tray window floating on your desktop. I clicked this one from the expanded overflow and it painted like this:

image.png


// 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;
Copy link
Member

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?

Comment on lines +263 to +272
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;
Copy link
Member

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;
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
}
}

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@deansheatherdeansheatherdeansheather left review comments

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Improve the logic for drawing the tray window
3 participants
@ibetitsmike@ethanndickson@deansheather

[8]ページ先頭

©2009-2025 Movatter.jp