From 045183032f29bdb2211bd2933dd318342fecf041 Mon Sep 17 00:00:00 2001 From: Sven Weidauer Date: Mon, 17 Jan 2011 15:00:18 +0000 Subject: Font scaling and other scaling related fixes. svn path=/trunk/netsurf/; revision=11349 --- cocoa/BrowserView.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'cocoa/BrowserView.m') diff --git a/cocoa/BrowserView.m b/cocoa/BrowserView.m index 74bdf7d24..2254ba0d5 100644 --- a/cocoa/BrowserView.m +++ b/cocoa/BrowserView.m @@ -25,6 +25,8 @@ #import "desktop/options.h" #import "desktop/selection.h" +#import "cocoa/font.h" + @implementation BrowserView @synthesize browser; @@ -38,8 +40,8 @@ static const NSTimeInterval CaretBlinkTime = 0.8; static inline NSRect cocoa_get_caret_rect( BrowserView *view ) { NSRect caretRect = { - .origin = view->caretPoint, - .size = NSMakeSize( CaretWidth, view->caretHeight ) + .origin = NSMakePoint( view->caretPoint.x * view->browser->scale, view->caretPoint.y * view->browser->scale ), + .size = NSMakeSize( CaretWidth, view->caretHeight * view->browser->scale ) }; return caretRect; @@ -88,6 +90,8 @@ static inline NSRect cocoa_get_caret_rect( BrowserView *view ) if (NULL == browser->current_content) return; + cocoa_set_font_scale_factor( browser->scale ); + NSRect frame = [self bounds]; const NSRect *rects = NULL; -- cgit v1.2.3