Open mgrojo opened 7 months ago
Hey @mgrojo thanks for reporting. QMenus and QComboBox are very complicated to deal with and correlated. This case is a special one where there is an icon + checkable action. You can also notice a space between the icon and name, which it was supposed to have a checkbox, or another indicator without this space as you mentioned. This is related to #308 and many other closed ones like #214. @ccordoba12 do you think @conradolandia can help us with this, since its more related to CSS?
@ccordoba12 do you think @conradolandia can help us with this, since its more related to CSS?
Yep, I think so. Is the idea to add a new css rule to the checked state of actions in QMenus?
I think something like this could work:
I would like to know if its possible to alter the icon in any way or if it's possible to add another icon... if so, I was also thinking about a checkmark icon added to the checked menu items. Something like this:
I think something like this could work
Yep, I think so too.
I would like to know if its possible to alter the icon in any way or if it's possible to add another icon
Probably not with css alone, but I really don't know.
Probably not with css alone, but I really don't know.
Maybe using pseudo-classes like .myclass:checked::after {...}
?
In the first example, maybe we can remove the extra space (where the check status go). It should be tested with checkable combo boxes too. Thanks for your attention on this.
Describe Your Environment
[Versions from your environment]
Language
C++
Description / Steps to Reproduce [if necessary]
Place a checkable action in a menu. Check and uncheck the entry.
Actual Result
There is no display hint about whether the menu entry is checked or not.
Expected Results / Proposed Result
Clear indication of the checked entries, like in the default style:
Relevant Code [if necessary]
Related UI definition in DB Browser for SQLite: https://github.com/sqlitebrowser/sqlitebrowser/blob/e77ae65c11a44c00489596120aff990e4df0a9d4/src/MainWindow.ui#L823