Commit 4a762894 authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

winemac: Adjust sizes of all descendant views when Retina mode changes.

As opposed to just the immediate subviews of the window contentView. Signed-off-by: 's avatarKen Thomases <ken@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 58cc34f4
......@@ -553,6 +553,24 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi
}
}
- (void) setRetinaMode:(int)mode
{
double scale = mode ? 0.5 : 2.0;
NSRect frame = self.frame;
frame.origin.x *= scale;
frame.origin.y *= scale;
frame.size.width *= scale;
frame.size.height *= scale;
[self setFrame:frame];
[self updateGLContexts];
for (WineContentView* subview in [self subviews])
{
if ([subview isKindOfClass:[WineContentView class]])
[subview setRetinaMode:mode];
}
}
- (BOOL) acceptsFirstMouse:(NSEvent*)theEvent
{
return YES;
......@@ -2301,15 +2319,7 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi
for (WineContentView* subview in [self.contentView subviews])
{
if ([subview isKindOfClass:[WineContentView class]])
{
frame = subview.frame;
frame.origin.x *= scale;
frame.origin.y *= scale;
frame.size.width *= scale;
frame.size.height *= scale;
[subview setFrame:frame];
[subview updateGLContexts];
}
[subview setRetinaMode:mode];
}
frame = [self contentRectForFrameRect:self.wine_fractionalFrame];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment