-
Notifications
You must be signed in to change notification settings - Fork 235
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
Check box and radio button icon support #573
Comments
Yep. I re-checked other L&Fs today to see how they handle it in menus and it is mostly handled like in I will most probably do it the same way it is done in |
Ok, since I decided to fix this once and for all - I've made a different approach at rendering state icon for First of all, here is the simple example state icons & custom icons: Here is how it will align with other elements with state icons only: And here are some normal menu items on top: And here is a small niche case I've also added proper handling for: This is basically the case when all state menu items do not have any custom icon while some other normal menu items are also present (with and without icons). This allows you not to have two ugly columns each of which is half-empty. Menu will properly align even with differently-sized icons: And even if you decide to go wild on the style: And here is the dark example: Alignments, paddings, layout and other settings can be adjusted for menu items in the style, although hopefully default layout and settings handle most cases. You can even disable aligning menu items: I'll be pushing these changes shortly, just need to check everything last time. |
- AbstractStateMenuItemPainter.java - Modified for a different approach at handling state icon support - AbstractStateButtonPainter.java, AbstractStateMenuItemPainter.java - Painter renamed from `checkStatePainter` to `stateIconPainter` - MenuItemLayout.java, AbstractMenuItemLayout.java - Reworked to support new `state-icon` constraints - MenuItemStateIcon.java, MenuItemStateIcon.xsd - Added for custom menu item state icon support - AbstractMenuItemLayout.java, AbstractMenuItemLayout.xsd - Added `stateIconGap` option to allow configuring gap between state and custom icon - StyleManager.java - Added `MenuItemStateIcon` annotation processing - checkboxmenuitem.xml, radiobuttonmenuitem.xml - Added `MenuItemStateIcon` usage under `state-icon` constraints for painting separate state icon - checkboxmenuitem.xml, radiobuttonmenuitem.xml - Adjusted light style to emphasize check/radio element better with smaller shadow - checkbox.xml, radiobutton.xml, checkboxmenuitem.xml, radiobuttonmenuitem.xml - Adjusted according to painter changes - tabbedpane.xml - Separated style from default menu items to avoid issues
These changes are now available in |
Right now checkbox and radio buttons (including menu items) can either display a check/radio icon or a custom icon, but not both at the same time. It would be nice to have them both.
To be more specific - changing component
Icon
should not remove or configure the check/radio icon anyhow, but instead add/remove a custom icon besides it.For menu items this also means that other items in the same menu will have to be properly aligned to check/radio+custom icon width (or ignore it?).
The text was updated successfully, but these errors were encountered: