Apache OpenOffice (AOO) Bugzilla – Issue 82954
AWT tree control: the text of selected tree node labels does not paint properly
Last modified: 2013-02-24 21:09:31 UTC
When selecting a tree node, the label gets highlighted with the proper system color, but the text of the label remains the same as when it is not selected. If the text highlight color and the control text color are both dark, it is difficult to read the label of the selected tree node.
Created attachment 49132 [details] Document with screenshots and some extra explanations.
Created attachment 49297 [details] A simple OOoBasic example of a tree control
confirming and targeting
fs->cl: svtreebx.cxx:1681 // set font color to highlight if ( !bCurFontIsSel && nItemType == SV_ITEM_ID_LBOXSTRING ) { Control::SetFont( aHiliteFont ); bCurFontIsSel = TRUE; } The nItemType here is 0 (which is an unknown type), thus the aHiliteFont (which has the proper color for selected text) is never set.
Created attachment 49401 [details] suggested fix
fs->cl: attached is a suggested fix. The original code only set the highlight color (strangely as part of a Font, instead of a TextColor) when the about-to-be-painted item was a string item. Which is an unnecessary optimization, IMO. Setting the highlight color always when painting a selected entry's item fixes the problem, and should not have too much side effects :)
applied fix from fs to cws impress134 for OOo 2.4
verified fix. @cl->cn: the attadched bugdocs fails since I renamed childs to children on the awt tree API in this cws. Just fix the line yourself or take the document from /tausch/cl/
not an API issue cn->cgu: are you the right owner for this?
CGU: Verified in cws impress134
Note: the bug doc's dialog cannot be loaded in m238 anymore, submitted as issue 84189.
note: submitted issue 84193 for the heavy repaint problems we have in m238 (needed to modify the bug doc, to work around issue 84189)
CGU: Integrated in dev300m25 and beb300m3