This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Text for BooleanStateAction too far to the right | ||
---|---|---|---|
Product: | platform | Reporter: | ivan <ivan> |
Component: | Actions | Assignee: | Jiri Rechtacek <jrechtacek> |
Status: | CLOSED FIXED | ||
Severity: | blocker | CC: | jrojcek, tboudreau |
Priority: | P3 | Keywords: | UI |
Version: | 4.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
ivan
2004-08-26 20:00:50 UTC
Jano, please for consideration. Thanks This is mostly about the Editor menu items. Editor menus? It's a generic menu issue. I used the View-><editor-options> just as an example. It's how a BooleanStateAction draws itself. OTOH notice how output2 constructs it's own raw menu w/o actions and avoids this problem. I wonder if that was to get around this very problem. It wasn't - I just needed a popup menu so I used a JPopupMenu, au natural. But we do have a problem currently with huge spaces on the left side in menus - it's okay on windows, but really noticable on the mac, for instance. If we don't want icons in menus, since we use menu subclasses anyway, far better to just strip the icons out than to use empty 16x16 icons just in case somebody forgets and provides one. There are 4 types of menu items that can be reasonable aligned: * label * label with icon * label with checkbox * label with radio button (other combinations should not be supported) Such menu items should be aligned into two columns: icon column, label column. The icon column is for an icon or checkbox or radio button. The label column is for a label. The icons, checkboxes or radio buttons are centered in the icon column. The labels are aligned to the left in the label column. In ascii art it would look like this: | Menu | ------- Label [i] Label with Icon (o) Label with Radio Button [x] Label with Checkbox The editor menus are not instances of BooleanStateAction(), the editor should solve its problems with action presenters. The BooleanStateAction uses standard JDK presenters e.g. JMenuItem() for a menu presenter. Is there a another example of wrong layout of BooleanStateAction? A grep through all the sources reveals a BooleanStateAction in the http monitor module. The context menu for "All Records" Node has a "Show Time Stamp" action which illustrates the alignment problem. Ivan, thanks, it's easy visible in monitor module. Maybe problem with setup JCheckBoxMenuItem in openide/awt/Actions for BooleanStateAction. I'm going to investigate more. BTW, on MacOS, the way main menus look is pretty ugly - you have this really huge gap on the left side where the icon should be. A better way to fix the whole missing icons problem might be in org.openide.awt.MenuBar, to have it simply remove menu item icons - then the actions could still have an icon when used in the toolbar - I know there's an open issue about that problem. fixed in main trunk; RCS file: /cvs/openide/src/org/openide/resources/actions/gap.gif,v done Checking in src/org/openide/resources/actions/gap.gif; /cvs/openide/src/org/openide/resources/actions/gap.gif,v <-- gap.gif initial revision: 1.1 done Processing log script arguments... More commits to come... Checking in src/org/openide/awt/Actions.java; /cvs/openide/src/org/openide/awt/Actions.java,v <-- Actions.java new revision: 1.104; previous revision: 1.103 done Boy this is an ugly fix... isn't it the responsibility of the L&F to make sure different kinds of menu items line up cleanly despite presence vs. absence of icons and use of checkboxes or radio buttons? This issue was solved long time ago. Because nobody has reopened it neither added comments, we are verifying/closing it now. If you are still able to reproduce the problem, please reopen. Thanks in advance. |