mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 02:49:19 +02:00
Qt: fixed TQtWidgetSet.ExtTextOut() where ETO_CLIPPED wasn't respected.
git-svn-id: trunk@32786 -
This commit is contained in:
parent
1bb16ace8f
commit
ddfb07097a
@ -2193,6 +2193,7 @@ function TQtWidgetSet.ExtTextOut(DC: HDC; X, Y: Integer; Options: Longint;
|
|||||||
var
|
var
|
||||||
WideStr: WideString;
|
WideStr: WideString;
|
||||||
QtDC: TQtDeviceContext absolute DC;
|
QtDC: TQtDeviceContext absolute DC;
|
||||||
|
B: Boolean;
|
||||||
begin
|
begin
|
||||||
{$ifdef VerboseQtWinAPI}
|
{$ifdef VerboseQtWinAPI}
|
||||||
WriteLn('[WinAPI ExtTextOut]');
|
WriteLn('[WinAPI ExtTextOut]');
|
||||||
@ -2215,6 +2216,18 @@ begin
|
|||||||
else
|
else
|
||||||
WideStr := GetUtf8String(Str);
|
WideStr := GetUtf8String(Str);
|
||||||
|
|
||||||
|
if (Options and ETO_CLIPPED <> 0) then
|
||||||
|
begin
|
||||||
|
B := QtDC.getClipping;
|
||||||
|
if not B then
|
||||||
|
begin
|
||||||
|
QtDC.save;
|
||||||
|
QtDC.setClipRect(Rect^);
|
||||||
|
end;
|
||||||
|
QtDC.drawText(X, Y, Rect^.Right - Rect^.Left, Rect^.Bottom - Rect^.Top, 0, @WideStr);
|
||||||
|
if not B then
|
||||||
|
QtDC.restore;
|
||||||
|
end else
|
||||||
QtDC.drawText(X, Y, @WideStr);
|
QtDC.drawText(X, Y, @WideStr);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user