mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-29 15:29:42 +03:00
Copy scale value from cloned window and setting new clip rect for every drawing operation.
svn path=/trunk/netsurf/; revision=11308
This commit is contained in:
parent
f47c0f16e2
commit
b65a405c3e
@ -87,15 +87,14 @@ static inline NSRect cocoa_get_caret_rect( BrowserView *view )
|
|||||||
if (NULL == browser->current_content) return;
|
if (NULL == browser->current_content) return;
|
||||||
|
|
||||||
NSRect frame = [self bounds];
|
NSRect frame = [self bounds];
|
||||||
|
|
||||||
plot.clip(0, 0, frame.size.width, frame.size.height);
|
|
||||||
|
|
||||||
|
|
||||||
const NSRect *rects = NULL;
|
const NSRect *rects = NULL;
|
||||||
NSInteger count = 0;
|
NSInteger count = 0;
|
||||||
[self getRectsBeingDrawn: &rects count: &count];
|
[self getRectsBeingDrawn: &rects count: &count];
|
||||||
|
|
||||||
for (NSInteger i = 0; i < count; i++) {
|
for (NSInteger i = 0; i < count; i++) {
|
||||||
|
plot.clip( NSMinX( rects[i] ), NSMinY( rects[i]), NSMaxX( rects[i] ), NSMaxY( rects[i] ) );
|
||||||
|
|
||||||
content_redraw(browser->current_content,
|
content_redraw(browser->current_content,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#import "desktop/gui.h"
|
#import "desktop/gui.h"
|
||||||
#import "desktop/netsurf.h"
|
#import "desktop/netsurf.h"
|
||||||
#import "desktop/browser.h"
|
#import "desktop/browser.h"
|
||||||
|
#import "desktop/options.h"
|
||||||
|
|
||||||
char *default_stylesheet_url;
|
char *default_stylesheet_url;
|
||||||
char *adblock_stylesheet_url;
|
char *adblock_stylesheet_url;
|
||||||
@ -60,6 +61,9 @@ struct browser_window;
|
|||||||
struct gui_window *gui_create_browser_window(struct browser_window *bw,
|
struct gui_window *gui_create_browser_window(struct browser_window *bw,
|
||||||
struct browser_window *clone, bool new_tab)
|
struct browser_window *clone, bool new_tab)
|
||||||
{
|
{
|
||||||
|
if (clone != NULL) bw->scale = clone->scale;
|
||||||
|
else bw->scale = (float) option_scale / 100;
|
||||||
|
|
||||||
return (struct gui_window *)[[BrowserWindow alloc] initWithBrowser: bw];
|
return (struct gui_window *)[[BrowserWindow alloc] initWithBrowser: bw];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user