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 69134 - Do not use htmlDisplayName for selected nodes
Summary: Do not use htmlDisplayName for selected nodes
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Petr Nejedly
URL:
Keywords: L&F, REGRESSION
Depends on:
Blocks:
 
Reported: 2005-11-22 21:10 UTC by Martin Krauskopf
Modified: 2008-12-22 16:40 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
example annotations under GTK L&F (40.04 KB, image/png)
2005-11-23 09:08 UTC, Martin Krauskopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Krauskopf 2005-11-22 21:10:14 UTC
With introducing CVS annotations selected nodes are sometime hardly visible.
Depends on used L&F. Problematic is GTK L&F and probably also Win2000 L&F
(WinClassic). But would be problem of any L&F/Theme combinantion. Solution is
not to use htmlDisplayName for selected nodes but just displayName.
We've already solved the same problem for Document Switchers (Ctrl-Tab,
Shift-F4). Ask Dafe for more details and problems involved. Fix should be
hopefully simple.
Comment 1 Petr Nejedly 2005-11-23 08:42:23 UTC
Do you have a screen shot?
Stripping markup is wrong, and the code should ensure contrasting color (if
color is the problem).
Comment 2 Martin Krauskopf 2005-11-23 09:08:15 UTC
Created attachment 27176 [details]
example annotations under GTK L&F
Comment 3 Martin Krauskopf 2005-11-23 09:11:03 UTC
Don't know how the explorer works. But I supposed that you may use plain
displayName of a node. Not stripping manually html markup from htmlDisplayName. 
Comment 4 Petr Nejedly 2005-11-23 13:57:40 UTC
The problem is that the algorithm in HtmlRenderer considers the colors
([0,128,0] vs. [53,140,219]) different enough, because the algorithm is naive.
The latter color has strong blue component, but blue doesn't contribute much to
the final luminance. The algorithm has to be fixed to take into account
different color sensitivity of human eye.

Tim, how can _you_ use such a naive algorithm?
Comment 5 David Simonek 2005-11-23 14:40:45 UTC
ale houby, just use getDisplayName instead of getHtmlDisplayName for selected
item and you are done, works acceptably IMHO., mkraukopf used the same technique
in case of editor document popup list.
 
However if you are willing to implement diploma thesis "Finding visually
contrasting color while still pleasing to human eye and respecting general color
schema", then it's your choice :-))
 
Comment 6 Martin Krauskopf 2005-11-23 15:00:10 UTC
BTW if Petr successfully achieves his diploma thesis we could revert our "fix"
in popup switchers.
Comment 7 Petr Nejedly 2005-11-23 15:27:18 UTC
Done...
Used better psychocolor model.
openide/awt/src/org/openide/awt/HtmlLabelUI.java,v1.10
Comment 8 Marian Mirilovic 2005-12-12 14:44:18 UTC
verified in NB 5.0 (200512111900)