IdeIntf: OI: fix font color for selected items in combobox [2]

git-svn-id: trunk@55312 -
This commit is contained in:
ondrej 2017-06-10 19:22:26 +00:00
parent 4c7dc1b89b
commit 3f34b29aae

View File

@ -3442,6 +3442,7 @@ var
CurRow: TOIPropertyGridRow;
ItemValue: string;
AState: TPropEditDrawState;
FontColor: TColor;
begin
if (FItemIndex>=0) and (FItemIndex<FRows.Count) then begin
CurRow:=Rows[FItemIndex];
@ -3460,9 +3461,12 @@ begin
if not(odBackgroundPainted in State) then
ValueComboBox.Canvas.FillRect(ARect);
FontColor := ValueComboBox.Canvas.Font.Color;
ValueComboBox.Canvas.Font.Assign(FDefaultValueFont);
if odSelected in State then
ValueComboBox.Canvas.Font.Color := clHighlightText;
ValueComboBox.Canvas.Font.Color := FontColor
else
ValueComboBox.Canvas.Font.Color := clWindowText;
if CurRow.Editor.HasDefaultValue and (ItemValue = CurRow.Editor.GetDefaultValue) then
ValueComboBox.Canvas.Font.Style := ValueComboBox.Canvas.Font.Style + [fsItalic];
CurRow.Editor.ListDrawValue(ItemValue,Index,ValueComboBox.Canvas,ARect,AState);