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.

Bug 189377 - The platform needs an option to make all the menus (menubar and popus) heavyweight.
Summary: The platform needs an option to make all the menus (menubar and popus) heavyw...
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal with 3 votes (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-11 06:53 UTC by michbarsinai
Modified: 2015-03-02 22:25 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
LIghtweight menu screencap (55.77 KB, image/png)
2010-08-11 06:59 UTC, michbarsinai
Details
Heavyweight popup screencap (61.89 KB, image/png)
2010-08-11 07:00 UTC, michbarsinai
Details
Screenshot of how it looks in Fedora 18 (420.54 KB, image/png)
2013-02-22 12:35 UTC, neugens
Details

Note You need to log in before you can comment on or make changes to this bug.
Description michbarsinai 2010-08-11 06:53:33 UTC
This is because modern UIs often add drop-shadow between the menu and the background, which swing doesn't. When clearlooks theme (on Ubuntu), for example, it is very hard to see the menu edges. When right-clicking low enough in the main window so that the popup menu would be partially outside of it, the popup menu gets the proper drop-shadow it deserves.

Might be solved by a simple call to JPopupMenu.setDefaultLightWeightPopupEnabled(false)


Product Version = NetBeans IDE 6.9 (Build 201007282301)
Operating System = Linux version 2.6.32-24-generic-pae running on i386
Java; VM; Vendor = 1.6.0_21
Runtime = Java HotSpot(TM) Client VM 17.0-b16
Comment 1 michbarsinai 2010-08-11 06:59:37 UTC
Created attachment 101298 [details]
LIghtweight menu screencap
Comment 2 michbarsinai 2010-08-11 07:00:11 UTC
Created attachment 101299 [details]
Heavyweight popup screencap
Comment 3 neugens 2013-01-24 19:03:01 UTC
A similar bug has been fixed recently in OpenJDK, in fact reverting all menues to be heavyweight by default, but NetBeans still uses lightweight menues.

Is it possible to have a followup to this bug?
Comment 4 neugens 2013-02-22 12:32:06 UTC
Here is how it looks for me:

http://ladybug-studio.com/~neugens/laf/netbeans/adwaita_based_theme_bug.png

Note that this is an official theme (I just modified it slightly). So NetBeans is unusable in Fedora with the default theme.
Comment 5 neugens 2013-02-22 12:33:17 UTC
I mark this as a defect since it's a bug, not a RFE.
Comment 6 neugens 2013-02-22 12:35:45 UTC
Created attachment 131730 [details]
Screenshot of how it looks in Fedora 18

Screenshot of how it looks in Fedora 18
Comment 7 Stanislav Aubrecht 2013-02-22 13:40:54 UTC
Missing borders in dropdown menus is a JDK bug, see #126165

If you need heavy weight menus then what's wrong with adding JPopupMenu.setDefaultLightWeightPopupEnabled(false) into one of your modules or creating a new module with that call?
Comment 8 neugens 2013-02-22 14:27:09 UTC
(In reply to comment #7)
> Missing borders in dropdown menus is a JDK bug, see #126165
> 
> If you need heavy weight menus then what's wrong with adding
> JPopupMenu.setDefaultLightWeightPopupEnabled(false) into one of your modules or
> creating a new module with that call?

Well, there is wrong that for use NetBeans to develop Java code I need to first create a new module (and hence learn how to do that) just to set a flag that should rather be the default. Well, this really seems rather backward to me, ymmv.

I'm sure it's a JDK bug, btw, but it effect NetBeans usability, since there is an easy fix, I think NetBeans should provide it, again ymmv.
Comment 9 neugens 2013-02-27 11:53:50 UTC
I know it's not me to decide if this is a bug or not, but you are shipping netbeans with the GTK laf as default, and this doesn't work.

If it's a JDK bug, you should at least make sure NetBeans defaults to some other laf.

Anyway, I went ahead and created a project to workaround this as it was suggested in a previous comment. It's very sad that the NetBeans developers themselves don't care as much about their own product, btw.

https://bitbucket.org/neugens/netbeans-gtk-laf-menu-fix
Comment 10 Stanislav Aubrecht 2013-03-06 10:40:17 UTC
setLightWeightPopupEnabled(false) has no effect on popup menu borders when using JDK 1.7 and GTK l&f
Comment 11 etrof 2015-03-02 22:25:08 UTC
(In reply to neugens from comment #9)
> I know it's not me to decide if this is a bug or not, but you are shipping
> netbeans with the GTK laf as default, and this doesn't work.
> 
> If it's a JDK bug, you should at least make sure NetBeans defaults to some
> other laf.
> 
> Anyway, I went ahead and created a project to workaround this as it was
> suggested in a previous comment. It's very sad that the NetBeans developers
> themselves don't care as much about their own product, btw.
> 
> https://bitbucket.org/neugens/netbeans-gtk-laf-menu-fix

This "fix" works fine for me on every machine - thanks.