1
0
mirror of synced 2024-11-15 00:43:50 +00:00

Fixed: selected item draws class name with clHighlightText, makes it visible with the silver XP theme

This commit is contained in:
Mark van Renswoude 2008-01-10 13:42:52 +00:00
parent 6fdf574708
commit 07d2233efd
4 changed files with 14 additions and 10 deletions

Binary file not shown.

View File

@ -137,10 +137,12 @@ Comments=
[HistoryLists\hlUnitAliases] [HistoryLists\hlUnitAliases]
Count=1 Count=1
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
[HistoryLists\hlSearchPath]
Count=1
Item0=P:\Algemeen\Components\Indy10\Core;P:\Algemeen\Components\Indy10\Protocols;P:\Algemeen\Components\Indy10\System
[HistoryLists\hlUnitOutputDirectory] [HistoryLists\hlUnitOutputDirectory]
Count=1 Count=1
Item0=..\..\Lib\D7 Item0=P:\algemeen\components\libd7
[HistoryLists\hlBPLOutput] [HistoryLists\hlBPLOutput]
Count=2 Count=1
Item0=..\..\Lib\D7 Item0=P:\algemeen\components\libd7
Item1=..\Lib\D7

View File

@ -117,7 +117,7 @@ type
procedure LoadSettings(); virtual; procedure LoadSettings(); virtual;
procedure SaveSettings(); virtual; procedure SaveSettings(); virtual;
procedure DrawItemText(ACanvas: TCanvas; AItem: TBaseSwItem; ARect: TRect); virtual; procedure DrawItemText(ACanvas: TCanvas; AItem: TBaseSwItem; ARect: TRect; AState: TOwnerDrawState); virtual;
protected protected
property ActiveItem: TBaseSwItem read FActiveItem write FActiveItem; property ActiveItem: TBaseSwItem read FActiveItem write FActiveItem;
property ItemList: TBaseSwItemList read FItemList write FItemList; property ItemList: TBaseSwItemList read FItemList write FItemList;
@ -548,7 +548,7 @@ begin
end; end;
procedure TfrmBaseSwDialog.DrawItemText(ACanvas: TCanvas; AItem: TBaseSwItem; ARect: TRect); procedure TfrmBaseSwDialog.DrawItemText(ACanvas: TCanvas; AItem: TBaseSwItem; ARect: TRect; AState: TOwnerDrawState);
var var
text: String; text: String;
@ -599,7 +599,7 @@ begin
end; end;
Inc(textRect.Left, ilsTypes.Width + 4); Inc(textRect.Left, ilsTypes.Width + 4);
DrawItemText(Canvas, currentItem, textRect); DrawItemText(Canvas, currentItem, textRect, State);
end; end;
end; end;

View File

@ -75,7 +75,7 @@ type
procedure LoadSettings(); override; procedure LoadSettings(); override;
procedure SaveSettings(); override; procedure SaveSettings(); override;
procedure DrawItemText(ACanvas: TCanvas; AItem: TBaseSwItem; ARect: TRect); override; procedure DrawItemText(ACanvas: TCanvas; AItem: TBaseSwItem; ARect: TRect; AState: TOwnerDrawState); override;
procedure UpdateClassFilter(); procedure UpdateClassFilter();
procedure SortList(); procedure SortList();
@ -281,7 +281,7 @@ begin
end; end;
procedure TfrmCmpSwDialog.DrawItemText(ACanvas: TCanvas; AItem: TBaseSwItem; ARect: TRect); procedure TfrmCmpSwDialog.DrawItemText(ACanvas: TCanvas; AItem: TBaseSwItem; ARect: TRect; AState: TOwnerDrawState);
var var
text: String; text: String;
textRect: TRect; textRect: TRect;
@ -299,7 +299,9 @@ begin
textRect.Right := ARect.Right - 2; textRect.Right := ARect.Right - 2;
{ Draw component class text } { Draw component class text }
if not (odSelected in AState) then
ACanvas.Font.Color := clGrayText; ACanvas.Font.Color := clGrayText;
text := (AItem as TCmpSwComponent).ComponentClass; text := (AItem as TCmpSwComponent).ComponentClass;
DrawText(ACanvas.Handle, PChar(text), Length(text), textRect, DT_SINGLELINE or DrawText(ACanvas.Handle, PChar(text), Length(text), textRect, DT_SINGLELINE or