diff options
author | Sven Weidauer <sven.weidauer@gmail.com> | 2011-01-28 08:54:55 +0000 |
---|---|---|
committer | Sven Weidauer <sven.weidauer@gmail.com> | 2011-01-28 08:54:55 +0000 |
commit | aa3fc46df54bf3f6591c8b127b93001a80c03118 (patch) | |
tree | a7578241121b5d79bacb4c5943987bea7545a34c /cocoa/HistoryView.m | |
parent | a1f1138479a276b78be2866bd6a29ee6eb019fb6 (diff) | |
download | netsurf-aa3fc46df54bf3f6591c8b127b93001a80c03118.tar.gz netsurf-aa3fc46df54bf3f6591c8b127b93001a80c03118.tar.bz2 |
Implemented resolution independence fot the TreeView and HistoryView and moved the coordinate transform function to their own header.
svn path=/trunk/netsurf/; revision=11513
Diffstat (limited to 'cocoa/HistoryView.m')
-rw-r--r-- | cocoa/HistoryView.m | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/cocoa/HistoryView.m b/cocoa/HistoryView.m index bbaec6c6e..9dc8da71c 100644 --- a/cocoa/HistoryView.m +++ b/cocoa/HistoryView.m @@ -22,12 +22,14 @@ #import "desktop/history_core.h" #import "desktop/plotters.h" #import "cocoa/font.h" +#import "cocoa/coordinates.h" +#import "cocoa/plotter.h" static NSRect cocoa_history_rect( struct browser_window *bw ) { int width, height; history_size( bw->history, &width, &height ); - return NSMakeRect( 0, 0, width + 10, height + 10 ); + return cocoa_rect( 0, 0, width + 10, height + 10 ); } @implementation HistoryView @@ -98,7 +100,8 @@ static NSRect cocoa_history_rect( struct browser_window *bw ) [path stroke]; cocoa_set_font_scale_factor( 1.0 ); - plot.clip( NSMinX( rect ), NSMinY( rect ), NSMaxX( rect ), NSMaxY( rect ) ); + cocoa_set_clip( rect ); + history_redraw( browser->history ); } @@ -106,7 +109,9 @@ static NSRect cocoa_history_rect( struct browser_window *bw ) { const NSPoint location = [self convertPoint: [theEvent locationInWindow] fromView: nil]; const bool newWindow = [theEvent modifierFlags] & NSCommandKeyMask; - history_click( browser, browser->history, location.x, location.y, newWindow ); + history_click( browser, browser->history, + cocoa_pt_to_px( location.x ), cocoa_pt_to_px( location.y ), + newWindow ); } - (BOOL) isFlipped; |