mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-30 06:32:42 +00:00
Resize NSView with multiples of 4
With this we should avoid seeing scaled pixels on screen with (e.g.) 3 pixels instead of 2 when Screen Scaling = 200%.
This commit is contained in:
parent
9e90061e37
commit
11401e9899
@ -38,8 +38,14 @@ using namespace she;
|
||||
|
||||
m_delegate = [[OSXWindowDelegate alloc] initWithWindowImpl:impl];
|
||||
|
||||
// The NSView width and height will be a multiple of 4. In this way
|
||||
// all scaled pixels should be exactly the same
|
||||
// for Screen Scaling > 1 and <= 4)
|
||||
self.contentResizeIncrements = NSMakeSize(4, 4);
|
||||
|
||||
OSXView* view = [[OSXView alloc] initWithFrame:rect];
|
||||
[view setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
|
||||
|
||||
[self setDelegate:m_delegate];
|
||||
[self setContentView:view];
|
||||
[self center];
|
||||
|
Loading…
x
Reference in New Issue
Block a user