Qt: fixed DrawFocusRect().

git-svn-id: trunk@17649 -
This commit is contained in:
zeljko 2008-12-01 15:43:42 +00:00
parent 3c5d2f3da3
commit 5411abe0a1

View File

@ -908,12 +908,15 @@ begin
QtDC := TQtDeviceContext(DC); QtDC := TQtDeviceContext(DC);
StyleOption := QStyleOptionFocusRect_create; StyleOption := QStyleOptionFocusRect_create;
QtDC.save;
try try
QStyleOption_setRect(StyleOption, @Rect); QStyleOption_setRect(StyleOption, @Rect);
QPainter_setClipRect(QtDC.Widget, @Rect);
QStyle_drawPrimitive(QApplication_style, QStylePE_FrameFocusRect, StyleOption, QtDC.Widget, QtDC.Parent); QStyle_drawPrimitive(QApplication_style, QStylePE_FrameFocusRect, StyleOption, QtDC.Widget, QtDC.Parent);
Result := True; Result := True;
finally finally
QStyleOptionFocusRect_destroy(StyleOption); QStyleOptionFocusRect_destroy(StyleOption);
QtDC.restore;
end; end;
end; end;