IdeIntf: PropEdits: fix painting of value combobox in QT

git-svn-id: trunk@55303 -
This commit is contained in:
ondrej 2017-06-10 10:39:19 +00:00
parent 24a6e20c0d
commit 7a420f8326

View File

@ -3344,6 +3344,19 @@ var
Style : TTextStyle; Style : TTextStyle;
OldColor : TColor; OldColor : TColor;
begin begin
OldColor := ACanvas.Brush.Color;
If (pedsInComboList in AState) and not (pedsInEdit in AState)
then begin
If pedsSelected in AState then begin
ACanvas.Brush.Color := clHighlight;
ACanvas.Font.Color := clHighlightText;
end
else begin
ACanvas.Brush.Color := clwhite{clWindow};
ACanvas.Font.Color := clWindowText;
end;
ACanvas.FillRect(ARect);
end;
FillChar(Style{%H-},SizeOf(Style),0); FillChar(Style{%H-},SizeOf(Style),0);
With Style do begin With Style do begin
Alignment := taLeftJustify; Alignment := taLeftJustify;
@ -3355,21 +3368,8 @@ begin
SingleLine := True; SingleLine := True;
SystemFont := False; SystemFont := False;
end; end;
If (pedsInComboList in AState) and not (pedsInEdit in AState)
then begin
OldColor := ACanvas.Brush.Color;
If pedsSelected in AState then begin
ACanvas.Brush.Color := clHighlight;
ACanvas.Font.Color := clHighlightText;
end
else begin
ACanvas.Brush.Color := clwhite{clWindow};
ACanvas.Font.Color := clWindowText;
end;
ACanvas.FillRect(ARect);
ACanvas.Brush.Color := OldColor;
end;
ACanvas.TextRect(ARect, ARect.Left+2,ARect.Top,AValue, Style); ACanvas.TextRect(ARect, ARect.Left+2,ARect.Top,AValue, Style);
ACanvas.Brush.Color := OldColor;
end; end;
{ these three procedures implement the default render behavior of the { these three procedures implement the default render behavior of the