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

PopupWindow (of a ComboBox or menu) should be able to adjust its position to fit in the screen #4870

Open
jakobhellermann opened this issue Mar 16, 2024 · 2 comments
Labels
a:builtin elements The runtime data structures related to the items (mO,bT)

Comments

@jakobhellermann
Copy link

jakobhellermann commented Mar 16, 2024

When a PopupWindow is about to be shown in way that it would be cut by the end of the screen (or the window, for inline popup), we should actually place that popup in a proper place.

Wayland uses a concept of positioner: https://wayland.app/protocols/xdg-shell#xdg_positioner

the PopupWindow should have an anchor rectangle and so on so that the platform can petition the popup properly.

Original message

basically #3345 for the case where the ComboBox is at the bottom of the screen, which wasn't fixed yet as acknowledged in #3861.

image

@ogoffart
Copy link
Member

Thanks for filling an issue.

The first bug is that the popup is being clipped by the window. This is tracked in #2375

Even if that problem was fixed, we would still have a problem if we were at the bottom of the screen, so we'd need a way to move the popup depending on its position on the screen.

@ogoffart ogoffart added the a:widgets Implementation of widgets (from std-widgets.slint) and their styles (mF,bS) label Mar 17, 2024
@FloVanGH FloVanGH added the a:builtin elements The runtime data structures related to the items (mO,bT) label Sep 16, 2024
@FloVanGH FloVanGH changed the title Combobox in fluent style renders out of screen to the bottom Edited: PopupWindow renders out of screen to the bottom Sep 16, 2024
@FloVanGH FloVanGH removed the a:widgets Implementation of widgets (from std-widgets.slint) and their styles (mF,bS) label Sep 16, 2024
@Enyium
Copy link
Contributor

Enyium commented Sep 16, 2024

Even if that problem was fixed, we would still have a problem if we were at the bottom of the screen, so we'd need a way to move the popup depending on its position on the screen.

Note that, for cases like this, Windows provides system settings. Although this may not apply to combo boxes specifically.

@ogoffart ogoffart changed the title Edited: PopupWindow renders out of screen to the bottom PopupWindow (of a ComboBox or menu) should be able to adjust its position to fit in the screen Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:builtin elements The runtime data structures related to the items (mO,bT)
Projects
None yet
Development

No branches or pull requests

4 participants