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: | Do not use htmlDisplayName for selected nodes | ||
---|---|---|---|
Product: | platform | Reporter: | Martin Krauskopf <mkrauskopf> |
Component: | Window System | Assignee: | Petr Nejedly <pnejedly> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | dsimonek, tboudreau |
Priority: | P2 | Keywords: | L&F, REGRESSION |
Version: | 5.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | example annotations under GTK L&F |
Description
Martin Krauskopf
2005-11-22 21:10:14 UTC
Do you have a screen shot? Stripping markup is wrong, and the code should ensure contrasting color (if color is the problem). Created attachment 27176 [details]
example annotations under GTK L&F
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. 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? 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 :-)) BTW if Petr successfully achieves his diploma thesis we could revert our "fix" in popup switchers. Done... Used better psychocolor model. openide/awt/src/org/openide/awt/HtmlLabelUI.java,v1.10 verified in NB 5.0 (200512111900) |