Keeps the Tags menu open while selecting and deselecting tags in the
search panel, saving many mouse clicks for multiple tags.
It cannot be done natively on QMenu (https://bugreports.qt.io/browse/QTBUG-6635)
but it is a one-liner and I haven't seen any bad behavior so far.
Details
- Reviewers
elvisangelaccio ngraham - Group Reviewers
Dolphin VDG - Commits
- R318:296082b2b929: (search) Keep menu open when selecting tags
- Tags menu does not close when selecting/deselecting tags
- Tag search is consistent
- Clicking anywhere else will close the menu
Diff Detail
- Repository
- R318 Dolphin
- Branch
- search_tags_sticky
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 20541 Build 20559: arc lint + arc unit
I think you probably want to use an event filter instead to keep the menu from closing in the first place?
I'm not so sure I want to enter there π
I have just tried and indeed it works but, as the file view is refreshed, there's a flickering effect,
which I find much more uncomfortable than when just reshowing the menu.
OTOH, with this method we can also set the spacebar to select/deselect tags by keyboard.
I have uploaded the version with eventFilter so you may try if the flicker is too much to be annoying or it is just me.
I'd still prefer the simplest/maybe hackiest oneliner to just re-show the menu:
m_tagsSelector->menu()->show();
Ehhhh, I find the flicker pretty annoying. :/
However aside from that, the menu population behavior with tags that include spaces is a bit... interesting...
I think I'll re-upload the first revision so you can try it too, and decide on that.
However aside from that, the menu population behavior with tags that include spaces is a bit... interesting...
Oh sure! That's a thing I saw back in the day but required some other changes in the query parsing bit, and then I forgot.
Now that those changes are in master, it's quite simple: D26369
Heh, there still seems to be a bit of flickering here even with this version. However this version has much less code! :D
The flickering in the current state is kind of unavoidable.
Every time a tag is clicked and a new search is made, the whole search url is reparsed and the menu gets repainted several times.
It seems to me that it is less annoying when the repainting is done "in the dark" and then show the menu again, that when it's keep visible the whole time.
Due to the way that tags are retrieved (using a KDirLister, as in the context menu) I cannot think of a better while simple way to do it without a major refactor and lots of extra code.
I have no strong feelings for this patch π so if you consider the user experience is worse than just closing the menu every time, I will happily abandon it.
I know this topic is closed now, but I just wanted to put forward a small suggestion for any possible future revisions of this code.
When clicking on a tag droplist, it would be nice if the first entry was a "filter" textbox, so that the user can type the name (or part of the name) of the tag that they are looking for and this will reduce the number of available tags to present right below (in the tag list with the checkboxes).
The filter text could be preserved until the user changes it themselves.
As a heavy user of tags (30+ tags), that would be an amazing feature to have.