christmo / macwidgets

Automatically exported from code.google.com/p/macwidgets
0 stars 0 forks source link

Appearance of disabled HUD controls #137

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Issue #135 described a double-edged bug: a disabled HUD combobox is not 
disabled, and the 
rendering of the disabled and untriggered popup does not look good.

It turns out that this appearance problem affects other controls which have had 
a HUD UI set on 
them; JButton and JCheckBox definitely do not look good at all. See attached 
screenshot.

The screenshot also includes some disabled HUD text fields. They seem to look 
okay, although a 
quick look at your source reveals that wasn't intentional. :)

Original issue reported on code.google.com by rbs10025@gmail.com on 11 Nov 2009 at 2:56

Attachments:

GoogleCodeExporter commented 8 years ago
Looks like this should be easy to fix.

Original comment by kenneth....@gmail.com on 16 Nov 2009 at 7:07

GoogleCodeExporter commented 8 years ago
This is partially complete with the fix for Issue 135.

Original comment by kenneth....@gmail.com on 17 Nov 2009 at 5:27

GoogleCodeExporter commented 8 years ago
The changes to the HUD button and combobox UI look good. I'm looking forward to 
what you do with 
checkboxes.

Just realized that I need to update the code I wrote for a HUD spinner UI. :)

Original comment by rbs10025@gmail.com on 17 Nov 2009 at 8:36

GoogleCodeExporter commented 8 years ago
Fixed. Grab the latest changes here:

http://www.macwidgetsforjava.com/downloads/latest/mac_widgets.jar

Original comment by kenneth....@gmail.com on 18 Nov 2009 at 12:10

GoogleCodeExporter commented 8 years ago
Ken, The fixes looked great, but a couple days later I have run into a big 
problem. I tried compiling your 
classes on a PowerMac G5 and XCode started puking errors about SwingUtilities2 
being an unrecognized 
symbol. You're calling a static method getFontMetrics in that class in 
HudButtonUI, HudCheckBoxUI, and HudRadioButtonUI.

Original comment by rbs10025@gmail.com on 22 Nov 2009 at 9:50

GoogleCodeExporter commented 8 years ago
My fault! There was no need for that call, just a copy and paste relic. I've 
updated the latest developer build -- 
give it a try and let me know if it solves your issue.

Original comment by kenneth....@gmail.com on 22 Nov 2009 at 12:40

GoogleCodeExporter commented 8 years ago
Ken, One more thing that causes trouble when compiling under Java 1.5 on a G5. 
In HudPaintingUtils, in the 
method updateGraphisToPaintDisabledControlIfNecessary (which is mis-spelled 
BTW), you have a line saying

graphics.setComposite(AlphaComposite.SrcOver.derive(0.5f));

The derive method was added to AlphaComposite in Java 1.6. To compile under 
1.5, that probably should be

graphics.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER,0.5f));

(Side question: Any why these lines compiled without complaint in XCode 3.2 
even though I have the ant target 
set to Java 1.5?)

Original comment by rbs10025@gmail.com on 22 Nov 2009 at 8:04

GoogleCodeExporter commented 8 years ago
OK, I've fixed that too (including the spelling mistake).

I think the target only indicates that Java 5 style byte code should be 
generated and doesn't have anything to do 
with what API's are available.

Original comment by kenneth....@gmail.com on 23 Nov 2009 at 11:37