mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-01 23:00:27 +02:00
Qt: better DrawFocusRect() patch.
git-svn-id: trunk@17654 -
This commit is contained in:
parent
e23cf3a342
commit
d2a489e5c4
@ -355,6 +355,7 @@ type
|
||||
function getRegionType(ARegion: QRegionH): integer;
|
||||
function getClipRegion: TQtRegion;
|
||||
procedure setClipping(const AValue: Boolean);
|
||||
procedure setClipRect(const ARect: TRect);
|
||||
procedure setClipRegion(ARegion: QRegionH; AOperation: QtClipOperation = QtReplaceClip);
|
||||
procedure setRegion(ARegion: TQtRegion);
|
||||
procedure drawImage(targetRect: PRect; image: QImageH; sourceRect: PRect;
|
||||
@ -2484,6 +2485,11 @@ begin
|
||||
QPainter_setClipping(Widget, AValue);
|
||||
end;
|
||||
|
||||
procedure TQtDeviceContext.setClipRect(const ARect: TRect);
|
||||
begin
|
||||
QPainter_setClipRect(Widget, @ARect);
|
||||
end;
|
||||
|
||||
procedure TQtDeviceContext.setClipRegion(ARegion: QRegionH;
|
||||
AOperation: QtClipOperation = QtReplaceClip);
|
||||
begin
|
||||
|
@ -911,7 +911,8 @@ begin
|
||||
QtDC.save;
|
||||
try
|
||||
QStyleOption_setRect(StyleOption, @Rect);
|
||||
QPainter_setClipRect(QtDC.Widget, @Rect);
|
||||
if not QtDC.getClipping then
|
||||
QtDC.setClipRect(Rect);
|
||||
QStyle_drawPrimitive(QApplication_style, QStylePE_FrameFocusRect, StyleOption, QtDC.Widget, QtDC.Parent);
|
||||
Result := True;
|
||||
finally
|
||||
|
Loading…
Reference in New Issue
Block a user