mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 11:59:20 +02:00
IdeIntf: OI: fix font color for selected items in combobox [2]
git-svn-id: trunk@55312 -
This commit is contained in:
parent
4c7dc1b89b
commit
3f34b29aae
@ -3442,6 +3442,7 @@ var
|
|||||||
CurRow: TOIPropertyGridRow;
|
CurRow: TOIPropertyGridRow;
|
||||||
ItemValue: string;
|
ItemValue: string;
|
||||||
AState: TPropEditDrawState;
|
AState: TPropEditDrawState;
|
||||||
|
FontColor: TColor;
|
||||||
begin
|
begin
|
||||||
if (FItemIndex>=0) and (FItemIndex<FRows.Count) then begin
|
if (FItemIndex>=0) and (FItemIndex<FRows.Count) then begin
|
||||||
CurRow:=Rows[FItemIndex];
|
CurRow:=Rows[FItemIndex];
|
||||||
@ -3460,9 +3461,12 @@ begin
|
|||||||
if not(odBackgroundPainted in State) then
|
if not(odBackgroundPainted in State) then
|
||||||
ValueComboBox.Canvas.FillRect(ARect);
|
ValueComboBox.Canvas.FillRect(ARect);
|
||||||
|
|
||||||
|
FontColor := ValueComboBox.Canvas.Font.Color;
|
||||||
ValueComboBox.Canvas.Font.Assign(FDefaultValueFont);
|
ValueComboBox.Canvas.Font.Assign(FDefaultValueFont);
|
||||||
if odSelected in State then
|
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
|
if CurRow.Editor.HasDefaultValue and (ItemValue = CurRow.Editor.GetDefaultValue) then
|
||||||
ValueComboBox.Canvas.Font.Style := ValueComboBox.Canvas.Font.Style + [fsItalic];
|
ValueComboBox.Canvas.Font.Style := ValueComboBox.Canvas.Font.Style + [fsItalic];
|
||||||
CurRow.Editor.ListDrawValue(ItemValue,Index,ValueComboBox.Canvas,ARect,AState);
|
CurRow.Editor.ListDrawValue(ItemValue,Index,ValueComboBox.Canvas,ARect,AState);
|
||||||
|
Loading…
Reference in New Issue
Block a user