OSDN Git Service

Log item which is selected but not focused is drawn differently
authornaru <bottle@mikage.to>
Wed, 9 Apr 2003 09:21:43 +0000 (09:21 +0000)
committernaru <bottle@mikage.to>
Wed, 9 Apr 2003 09:21:43 +0000 (09:21 +0000)
bottleclient/LogForm.pas

index 3a0a167..78fdfa5 100755 (executable)
@@ -1045,7 +1045,10 @@ begin
 
   lvwLog.Canvas.Brush.Style := bsSolid;
   if Item.Selected then begin
-    lvwLog.Canvas.Brush.Color := clHighlight
+    if lvwLog.Focused then
+      lvwLog.Canvas.Brush.Color := clHighlight
+    else
+      lvwLog.Canvas.Brush.Color := clBtnFace;
   end else begin
     lvwLog.Canvas.Brush.Color := Pref.BgColor;
   end;
@@ -1055,8 +1058,12 @@ begin
     lvwLog.Canvas.DrawFocusRect(DestRect);
 
   if Item.Selected then
-    lvwLog.Canvas.Font.Color := clHighlightText
-  else
+  begin
+    if lvwLog.Focused then
+      lvwLog.Canvas.Font.Color := clHighlightText
+    else
+      lvwLog.Canvas.Font.Color := clWindowText;
+  end else
     lvwLog.Canvas.Font.Color := Pref.TalkColorH;
   lvwLog.Canvas.Refresh;
 
@@ -1162,7 +1169,13 @@ begin
           lvwLog.Canvas.Font.Color := Pref.TalkColorH;
       end;
     end;
-    if Item.Selected then lvwLog.Canvas.Font.Color := clHighlightText;
+    if Item.Selected then
+    begin
+      if lvwLog.Focused then
+        lvwLog.Canvas.Font.Color := clHighlightText
+      else
+        lvwLog.Canvas.Font.Color := clWindowText;
+    end;
     lvwLog.Canvas.Refresh;
     w := lvwLog.Canvas.TextWidth(SsParser[i]);
     lvwLog.Canvas.TextRect(Rect, Rect.Left + x, Rect.Top + 2, SsParser[i]);