QMacStyle: Use NSRect instead of CGRect in drawNSViewInRect()
Change-Id: I90fd62dea377dfa9569d1730a67136c7a5dc6f82 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
This commit is contained in:
parent
1910454fe0
commit
e3bfd9bea6
@ -1897,11 +1897,11 @@ void QMacStylePrivate::drawNSViewInRect(NSView *view, const QRect &qtRect, QPain
|
||||
[NSGraphicsContext setCurrentContext:[NSGraphicsContext
|
||||
graphicsContextWithGraphicsPort:ctx flipped:YES]];
|
||||
|
||||
CGRect rect = CGRectMake(qtRect.x() + 1, qtRect.y(), qtRect.width(), qtRect.height());
|
||||
NSRect rect = NSMakeRect(qtRect.x() + 1, qtRect.y(), qtRect.width(), qtRect.height());
|
||||
|
||||
[backingStoreNSView addSubview:view];
|
||||
view.frame = NSRectFromCGRect(rect);
|
||||
[view drawRect:NSRectFromCGRect(rect)];
|
||||
view.frame = rect;
|
||||
[view drawRect:rect];
|
||||
[view removeFromSuperviewWithoutNeedingDisplay];
|
||||
|
||||
[NSGraphicsContext restoreGraphicsState];
|
||||
|
Loading…
Reference in New Issue
Block a user