mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 13:20:18 +02:00
Qt5: implemented selected text in teEdit
git-svn-id: trunk@62225 -
This commit is contained in:
parent
9faf79f661
commit
d2504e98d1
@ -566,7 +566,7 @@ var
|
||||
Context: TQtDeviceContext;
|
||||
Widget: QWidgetH;
|
||||
W: WideString;
|
||||
TextRect: TRect;
|
||||
TextRect, SelRect: TRect;
|
||||
AOldMode: Integer;
|
||||
ATextPalette: Cardinal;
|
||||
AQColor: TQColor;
|
||||
@ -707,6 +707,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,
|
||||
|
Loading…
Reference in New Issue
Block a user