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

Add option to position menu like spotlight #712

Open
2 tasks done
weisJ opened this issue Jan 23, 2024 · 5 comments
Open
2 tasks done

Add option to position menu like spotlight #712

weisJ opened this issue Jan 23, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@weisJ
Copy link
Contributor

weisJ commented Jan 23, 2024

Before Submitting Your Feature Request

  • Check that there isn't already a similar feature request to avoid creating a duplicate.
  • I have seen the FAQ.

Problem

I would like to have an option to position the menu such that its top edge aligns with the top edge default spotlight location.
This would make it more predictable where the menu pops up.

Solution

This could just replace the center in window mode or be a separate setting.

I couldn't quite figure out how to add a new option in the corresponding settings combobox, so if the second option is preferable I would need some assistance in implementing this.

@weisJ weisJ added the enhancement New feature or request label Jan 23, 2024
@p0deje
Copy link
Owner

p0deje commented Jan 25, 2024

I would like to have an option to position the menu such that its top edge aligns with the top edge default spotlight location.
This would make it more predictable where the menu pops up.

Spotlight window is movable, so I am not sure I follow how this makes location more predictable. Can you elaborate a bit more?

@weisJ
Copy link
Contributor Author

weisJ commented Jan 25, 2024

I don't intend to actually follow the spotlight position. Currently depending on the number of history items the menu is larger or taller. Because the entering modes center the whole menu window this causes the search bar to be at different positions, which feels a bit unintuitive e.g. if I have only 1 entry in the history the search bar will be close to the center of the screen while with e.g. 100 entries it will be at the top of the screen.

@p0deje
Copy link
Owner

p0deje commented Jan 26, 2024

Ok, I see what you mean now. This could be useful, and I wouldn't mind merging a PR.

However, right now I feel like we might need to get rid of the custom logic that adjusts menu height/position as it seems that macOS 14.3 finally fixed its issues around that and our logic is still error-prone in many cases (#29). I have a build where I removed all that custom logic and so far Maccy seems to position just fine by cursor and no longer jumping around as it used to.

Do you think we'd be able to implement this feature w/o the code for custom adjustment of menu height or enabled only for it?

@p0deje
Copy link
Owner

p0deje commented Jan 26, 2024

Actually, 14.3 still reports an incorrect menu height initially so the code would need remain. I will adapt it to only run when centering a menu in a screen/window.

@p0deje
Copy link
Owner

p0deje commented Jan 26, 2024

@weisJ Would you mind looking at 8442207 and see if you can spot any issues? This seems to work fine in my basic testing scenarios.

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

No branches or pull requests

2 participants