Qt: implemented selected text in teEdit

git-svn-id: trunk@62224 -
This commit is contained in:
zeljko 2019-11-10 13:41:10 +00:00
parent c215455679
commit 9faf79f661

View File

@ -568,7 +568,7 @@ var
Context: TQtDeviceContext;
Widget: QWidgetH;
W: WideString;
TextRect: TRect;
TextRect, SelRect: TRect;
AOldMode: Integer;
ATextPalette: Cardinal;
AQColor: TQColor;
@ -709,6 +709,13 @@ begin
begin
if IsDisabled(Details) then
QPalette_setCurrentColorGroup(Palette, QPaletteDisabled);
if GetControlState(Details) and QStyleState_Selected <> 0 then
begin
Context.font.Metrics.boundingRect(@SelRect, @R, DTFlagsToQtFlags(Flags), @W);
ColorRefToTQColor(ColorToRGB(clHighlight), AQColor);
QPainter_fillRect(Context.Widget, @SelRect, PQColor(@AQColor));
ATextPalette := QPaletteHighlightedText;
end;
end;
QStyle_drawItemText(Style, Context.Widget, @R,