Issue 82954 - AWT tree control: the text of selected tree node labels does not paint properly
Summary: AWT tree control: the text of selected tree node labels does not paint properly
Status: CLOSED FIXED
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Trivial
Target Milestone: ---
Assignee: christian.guenther
QA Contact: issues@api
URL:
Keywords:
Depends on:
Blocks: 81048
  Show dependency tree
 
Reported: 2007-10-25 03:21 UTC by Ariel Constenla-Haile
Modified: 2013-02-24 21:09 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Document with screenshots and some extra explanations. (86.86 KB, application/vnd.sun.xml.writer)
2007-10-25 03:23 UTC, Ariel Constenla-Haile
no flags Details
A simple OOoBasic example of a tree control (23.23 KB, application/vnd.sun.xml.writer)
2007-10-31 15:49 UTC, Ariel Constenla-Haile
no flags Details
suggested fix (2.38 KB, patch)
2007-11-04 14:20 UTC, Frank Schönheit
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Ariel Constenla-Haile 2007-10-25 03:21:12 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.
Comment 1 Ariel Constenla-Haile 2007-10-25 03:23:36 UTC
Created attachment 49132 [details]
Document with screenshots and some extra explanations.
Comment 2 Ariel Constenla-Haile 2007-10-31 15:49:03 UTC
Created attachment 49297 [details]
A simple OOoBasic example of a tree control
Comment 3 Frank Schönheit 2007-11-03 15:24:44 UTC
confirming and targeting
Comment 4 Frank Schönheit 2007-11-03 22:16:47 UTC
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.
Comment 5 Frank Schönheit 2007-11-04 14:20:01 UTC
Created attachment 49401 [details]
suggested fix
Comment 6 Frank Schönheit 2007-11-04 14:21:37 UTC
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 :)
Comment 7 clippka 2007-11-06 15:19:37 UTC
applied fix from fs to cws impress134 for OOo 2.4
Comment 8 clippka 2007-11-10 19:31:09 UTC
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/
Comment 9 chne 2007-11-12 14:28:23 UTC
not an API issue
cn->cgu: are you the right owner for this?
Comment 10 christian.guenther 2007-11-19 17:39:02 UTC
CGU: Verified in cws impress134
Comment 11 Frank Schönheit 2007-12-03 11:24:06 UTC
Note: the bug doc's dialog cannot be loaded in m238 anymore, submitted as issue
84189.
Comment 12 Frank Schönheit 2007-12-03 11:27:40 UTC
note: submitted issue 84193 for the heavy repaint problems we have in m238
(needed to modify the bug doc, to work around issue 84189)
Comment 13 christian.guenther 2008-07-17 19:44:36 UTC
CGU: Integrated in dev300m25 and beb300m3