View Issue Details

IDProjectCategoryView StatusLast Update
0002072LazarusIDEpublic2008-04-24 10:10
ReporterKazimierz Król Assigned ToVincent Snijders  
PrioritynormalSeveritytrivialReproducibilityalways
Status closedResolutionfixed 
PlatformAMD AthlonOSWindows 
Product Version0.9.15 (SVN) 
Target Version1.0.0Fixed in Version0.9.15 (SVN) 
Summary0002072: Text colour in Object inspector
DescriptionI use non-standard colour in Windows for selected items (clHighlight) - it is light orange, and the text in Object inspector (the smaller window with object tree view) uses white text colour for selected items, which causes them to be almost unreadable. The thing is that it should use the clHighlightText colour, as it is configureable in Windows, so that higlighted text could be read.
TagsNo tags attached.
Fixed in Revision9257
LazTarget1.0
WidgetsetWin32/Win64
Attached Files

Activities

2006-05-08 12:55

 

highlight.gif (3,665 bytes)   
highlight.gif (3,665 bytes)   

Vincent Snijders

2006-05-09 06:25

manager   ~0002860

Does this happen to other treeviews too?

Kazimierz Król

2006-05-09 10:02

reporter   ~0002862

Yes, I just noticed that it is also this way for:
 Editor settings => Shortcut keys
 Project inspector
 Compiler options => Inherited
 Components => Packages list
 Environment => Code Tools Defines Editor
 Tree View items editor (when setting content for a Tree View)
 TThreeView component (although you can set the selection colour manually, you can't set the selected text colour)

This is all I found, there can be more.

Vincent Snijders

2006-05-09 10:07

manager   ~0002863

Proposed patch:

Index: treeview.inc
===================================================================
--- treeview.inc (revision 9256)
+++ treeview.inc (working copy)
@@ -3830,13 +3830,17 @@
   function InvertColor(AColor: TColor): TColor;
   var Red, Green, Blue: integer;
   begin
- Result:=clWhite;
- Red:=(AColor shr 16) and $ff;
- Green:=(AColor shr 8) and $ff;
- Blue:=AColor and $ff;
- if Red+Green+Blue>$180 then
- Result:=clBlack;
+ if AColor<>clHighlight then begin
+ Result:=clWhite;
+ Red:=(AColor shr 16) and $ff;
+ Green:=(AColor shr 8) and $ff;
+ Blue:=AColor and $ff;
+ if Red+Green+Blue>$180 then
+ Result:=clBlack;
     //DebugLn('[TCustomTreeView.DoPaintNode.InvertColor] Result=',Result,' ',Red,',',Green,',',Blue);
+ end
+ else
+ Result := clHighlightText;
   end;
 
   function DrawTreeLines(CurNode: TTreeNode): integer;

Kazimierz Król

2006-05-09 13:29

reporter   ~0002866

The patch works ok for TTreeView control (after replacing the function in treeview.inc and rebuilding the LCL), but I can't manage to rebuild Lazarus IDE. Maybe I am doing something wrong, I'm sory if so. I don't know if it's a bug, so I post it here. Every time I get the message "can't find unit FileUtil". I tried to add the path "\lcl" (where the unit is) in some places, that seemed to be connected with this, but no change. I copied the unit to the "\tools" directory, but then another unit (that is also in \lcl dir) could not be found. Something is that the compiler doesn't see the \lcl directory. Any ideas what to do? I use Win XP.

Vincent Snijders

2006-05-09 18:35

manager   ~0002868

Last edited: 2006-05-09 18:37

In the configure Build Lazarus dialog, did you click "Build All" button?

And please, undo all your changes with moving around files.

Vincent Snijders

2006-05-10 03:00

manager   ~0002870

patch applied.

Issue History

Date Modified Username Field Change
2006-05-08 12:55 Kazimierz Król New Issue
2006-05-08 12:55 Kazimierz Król File Added: highlight.gif
2006-05-08 12:55 Kazimierz Król Widgetset => Win32
2006-05-09 06:25 Vincent Snijders Target => 1.0
2006-05-09 06:25 Vincent Snijders Note Added: 0002860
2006-05-09 06:25 Vincent Snijders Assigned To => Vincent Snijders
2006-05-09 06:25 Vincent Snijders Status new => feedback
2006-05-09 10:02 Kazimierz Król Note Added: 0002862
2006-05-09 10:07 Vincent Snijders Note Added: 0002863
2006-05-09 13:29 Kazimierz Król Note Added: 0002866
2006-05-09 18:35 Vincent Snijders Note Added: 0002868
2006-05-09 18:37 Vincent Snijders Note Edited: 0002868
2006-05-10 03:00 Vincent Snijders Fixed in Revision => 9257
2006-05-10 03:00 Vincent Snijders Status feedback => resolved
2006-05-10 03:00 Vincent Snijders Fixed in Version => 0.9.15 (SVN)
2006-05-10 03:00 Vincent Snijders Resolution open => fixed
2006-05-10 03:00 Vincent Snijders Note Added: 0002870
2006-12-05 23:36 Marc Weustink Status resolved => closed
2008-04-24 10:10 Vincent Snijders Target Version => 1.0.0