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: adjust the popup direction of combobox to adaptive #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pigeoner
Copy link

System information for bug reporting and debugging

System	: Windows 11 Version 23H2
CPU	: x86_64
Kernel	: winnt-10.0.22631
ABI	: x86_64-little_endian-llp64
WSRX	: 0.2.31.g195a598
Machine	: LAPTOP-5HC8OVNN-cb79d211-728d-4bbb-b01d-c7f676d5c40d

Description

Original

When clicking on combobox, it will first attempt to pop up menu items downwards. If there is not enough space below, it will switch to popping up upwards, which will cause a slight flicker.

1.mp4

Modification plan

  • First calculate the distance between the current combobox and the bottom of the window.
  • If it is greater than the height of the pop-up box, it will pop up downwards.
  • Otherwise, it will pop up upwards

2.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant