summaryrefslogtreecommitdiffstats
path: root/macosx/HBPreviewController.m
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2016-04-09 08:48:13 +0200
committerDamiano Galassi <[email protected]>2016-04-09 08:48:13 +0200
commitca2fc63cfd6a47920492bc96c3efd7e207af817d (patch)
tree91fdf2f57913a45ed1b10436dbbfef3df24335f6 /macosx/HBPreviewController.m
parentfd32646995d4cf6386a6569a05282fa1dc1f80f0 (diff)
MacGui: do not set the preview window frame origin to a value outside the screen area.
Diffstat (limited to 'macosx/HBPreviewController.m')
-rw-r--r--macosx/HBPreviewController.m5
1 files changed, 1 insertions, 4 deletions
diff --git a/macosx/HBPreviewController.m b/macosx/HBPreviewController.m
index 974173d52..be881dd73 100644
--- a/macosx/HBPreviewController.m
+++ b/macosx/HBPreviewController.m
@@ -91,11 +91,8 @@ typedef enum ViewMode : NSUInteger {
if (centerString.length)
{
NSPoint center = NSPointFromString(centerString);
- NSRect frame = self.window.frame;
- [self.window setFrameOrigin:NSMakePoint(center.x - floor(frame.size.width / 2),
- center.y - floor(frame.size.height / 2))];
-
self.windowCenterPoint = center;
+ [self resizeWindowForViewSize:NSMakeSize(MIN_WIDTH, MIN_HEIGHT) animate:NO];
}
else
{