mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-07 10:21:30 +00:00
Fix window resize on Skia/OSX
This commit is contained in:
parent
0a1f492c24
commit
47f493df78
@ -34,8 +34,6 @@ public:
|
|||||||
OSXWindowImpl* m_impl;
|
OSXWindowImpl* m_impl;
|
||||||
OSXWindowDelegate* m_delegate;
|
OSXWindowDelegate* m_delegate;
|
||||||
int m_scale;
|
int m_scale;
|
||||||
gfx::Size m_clientSize;
|
|
||||||
gfx::Size m_restoredSize;
|
|
||||||
}
|
}
|
||||||
- (OSXWindow*)initWithImpl:(OSXWindowImpl*)impl;
|
- (OSXWindow*)initWithImpl:(OSXWindowImpl*)impl;
|
||||||
- (OSXWindowImpl*)impl;
|
- (OSXWindowImpl*)impl;
|
||||||
|
@ -23,9 +23,6 @@
|
|||||||
m_scale = 1;
|
m_scale = 1;
|
||||||
|
|
||||||
NSRect rect = NSMakeRect(0, 0, 640, 480);
|
NSRect rect = NSMakeRect(0, 0, 640, 480);
|
||||||
m_clientSize.w = m_restoredSize.w = rect.size.width;
|
|
||||||
m_clientSize.h = m_restoredSize.h = rect.size.height;
|
|
||||||
|
|
||||||
self = [self initWithContentRect:rect
|
self = [self initWithContentRect:rect
|
||||||
styleMask:(NSTitledWindowMask | NSClosableWindowMask |
|
styleMask:(NSTitledWindowMask | NSClosableWindowMask |
|
||||||
NSMiniaturizableWindowMask | NSResizableWindowMask)
|
NSMiniaturizableWindowMask | NSResizableWindowMask)
|
||||||
@ -68,12 +65,13 @@
|
|||||||
|
|
||||||
- (gfx::Size)clientSize
|
- (gfx::Size)clientSize
|
||||||
{
|
{
|
||||||
return m_clientSize;
|
return gfx::Size([[self contentView] frame].size.width,
|
||||||
|
[[self contentView] frame].size.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (gfx::Size)restoredSize
|
- (gfx::Size)restoredSize
|
||||||
{
|
{
|
||||||
return m_restoredSize;
|
return [self clientSize];
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user