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

[Proposal] Enhancements to WindowStartupLocation #5782

Closed
ngarside opened this issue Apr 15, 2021 · 1 comment
Closed

[Proposal] Enhancements to WindowStartupLocation #5782

ngarside opened this issue Apr 15, 2021 · 1 comment

Comments

@ngarside
Copy link
Contributor

Looking for feedback if this would be wanted in Avalonia.

Is your feature request related to a problem? Please describe.

I need a way to open windows in the corner of the screen, with a margin separating them from the screen edge and taskbar.

Describe the solution you'd like

Extend WindowStartupLocation

public enum WindowStartupLocation
{
	// Existing
	Manual,
	CenterScreen,
	CenterOwner,

	// New
	TopLeft,
	TopRight,
	BottomRight,
	BottomLeft,
}

For the screen edge margin, I'd piggyback off of Layoutable.Margin (which as far as I can tell isn't used by Window currently).

I'm not sure if/how it would work with owned windows, or if it even should work with them.

Describe alternatives you've considered

I was planning to create a Window subclass for my own project, so if this is outside the scope of Avalonia itself then I'll just continue with that.

Additional context

This would likely have issues on wayland, although I haven't checked how CenterScreen works on wayland, so maybe it's no different.

@kekekeks
Copy link
Member

For Wayland that feature won't work at all, so don't worry much about that.

@ngarside ngarside closed this as not planned Won't fix, can't repro, duplicate, stale May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants