[aseprite] 171/250: Resize NSView with multiples of 4

Tobias Hansen thansen at moszumanska.debian.org
Sun Dec 20 15:27:27 UTC 2015


This is an automated email from the git hooks/post-receive script.

thansen pushed a commit to branch master
in repository aseprite.

commit 11401e989997f5c81ac3d190e42c8503daa78ad0
Author: David Capello <davidcapello at gmail.com>
Date:   Wed Oct 14 13:11:08 2015 -0300

    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%.
---
 src/she/osx/window.mm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/she/osx/window.mm b/src/she/osx/window.mm
index 6713181..59e1b09 100644
--- a/src/she/osx/window.mm
+++ b/src/she/osx/window.mm
@@ -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];

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git



More information about the Pkg-games-commits mailing list