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: | Infoline can hide the menus if netbeans.windows.small_main_window=true | ||
---|---|---|---|
Product: | platform | Reporter: | Jiri Rechtacek <jrechtacek> |
Component: | Window System | Assignee: | Jiri Rechtacek <jrechtacek> |
Status: | CLOSED FIXED | ||
Severity: | blocker | CC: | jglick |
Priority: | P4 | ||
Version: | 3.x | ||
Hardware: | PC | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 15372 | ||
Attachments: |
Test class
Proposed patch a example Proposed patch (revised) |
Description
Jiri Rechtacek
2002-01-29 16:54:41 UTC
*** Issue 15372 has been marked as a duplicate of this issue. *** *** Issue 12926 has been marked as a duplicate of this issue. *** Created attachment 4988 [details]
Test class
I can reproduce it by trying to compile the attached class with Jikes. Just run with -J-Dnetbeans.windows.small_main_window=true on a fresh user dir; MDI mode 1024x768; mount new empty dir; place this file in package root; set Java default compiler to Jikes; press F9; press F12 until you get to one of the longer error messages, and the menu names get squeezed out. I have a simple patch which seems to work fine, will attach for review. Created attachment 4989 [details]
Proposed patch
Impl notes: - (StatusLine extends) JLabel sets min & max size to same as preferred. - Default layout manager for menu bar is BoxLayout (trivial subclass). - BoxLayout does not provide a way to control relative allotments of space. - GridBagLayout should, I thought, but for some reason it does not seem to work. I tried everything I could think of with GBL, but so long as the preferredSize of the label is big, the GBL will squeeze the JMenu's. - So, ensuring the preferredSize just doesn't get too big. It seems to work. - Alternate more complex impl would be to define custom layout manager which provides requested preferredSize for all but last component - the JMenu's - and remainder of available space for last - StatusLine. Hi Jesse, the patch can't fix this problem I think. See core/windows/MainWindow.StatusMenuBar. The status line with small_main_window is made as next menu bar (w/o mnemonic). If there is a lack od f space whole menu is squeezed, The menu bar for status line gains because w/o mnemonic. (See snapshot). Created attachment 4990 [details]
a example
On the other hand the patch can help for most usage. On my view it fixes enough. Integrate patch, thanks. I guess this only happens if you make the main window narrower than about 300 pixels? Should I make the max preferred size smaller still, say 100 pixels? ok, 100 will be nice. Created attachment 5124 [details]
Proposed patch (revised)
Do you think you could commit the attached patch? I am having CVS problems at the moment. Thanks if so. a patch (the last attachment) was applied verified in [nb_dev](20020529) Resolved for 3.4.x or earlier, no new info since then -> closing. |