From 02a8722cc66980069afe7c674dbb93710846a07f Mon Sep 17 00:00:00 2001 From: Richard Wilson Date: Fri, 8 Sep 2006 16:57:26 +0000 Subject: [PATCH] Fix 1553282. svn path=/trunk/netsurf/; revision=2932 --- !NetSurf/Resources/de/Templates,fec | Bin 18840 -> 18752 bytes !NetSurf/Resources/en/Templates,fec | Bin 18781 -> 18769 bytes !NetSurf/Resources/fr/Templates,fec | Bin 19194 -> 19106 bytes !NetSurf/Resources/nl/Templates,fec | Bin 18867 -> 18779 bytes desktop/browser.c | 34 ++++++++- desktop/browser.h | 1 + desktop/gui.h | 2 + riscos/dialog.c | 47 ++++-------- riscos/gui.h | 11 --- riscos/window.c | 111 ++++++++++++++++------------ 10 files changed, 113 insertions(+), 93 deletions(-) diff --git a/!NetSurf/Resources/de/Templates,fec b/!NetSurf/Resources/de/Templates,fec index 0834df26eed22f5f0fecd647189363edb949de52..35996c0d34e08de3157c864456034b49490ca0e2 100755 GIT binary patch delta 584 zcmXYtKS&%w6vp4KhG<|?Xk-W)Ss@~UQ||B&$Z^7npg|DH*&oX~=N+!Q!_J->5o}VW z61UL8Mid1LiGQ%NI8aE66oy!&2$=L13L#oZF5hsw%(uVyzHest?QTRyWzG1sX}0_` zh_GnM_ve^5!-NW%j1Eoy@_vwL)2yYA@8y+n%7I`kihi3sH8D)I9j8jU(GvPZT2$}Y`kKfe2O+7!wk)b-G`Ff)E`bhS+uUOS;wW3GBl`*JGQ@0i47cHVd zTx~+%2sJ=o&=TPOkl1ig&&b<|tXGh|s$m7HQ| zsae}Ci9mSK-atn#l}xfp83y@85aV|8Tb}F_)2+C$an#Apj`q<=#StVaBUMQZ}8p$e8hF`yCq8e54i9! zw|HDWruYTCV19uDBBk~3Y^)MZK)-~32>t{Qs-%=)x149dKNWrj`mA4#x*p&cP4FUP$fJW%0=!3!^K|Ki+!vBV5 z0xby$Ybfd^Ql?SQ0LY|(VTZL)tkGUxh=g@ZH<;@6vVgawKfoq$#(d7SF;mp=|m#?;5ZZ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qL>z$s0`j}avQv|o#=8iN zNXHOk@XsR4GGV9E#{U4%An;29q@VyF>;mH)^cOatg)9@uZW%I;hf!+}jz_5*{22UE zAa(;ap{Izj~JAA-%_&UAwb5+j3%v zGG8~fyVMZIdYD^U?@)bE1DWwwuj2yWB%fSUm+`K=!lfp$wC}Tjl~1){4cGI&Ri^p? z-iLe?DhMyar&pQUx9|!TJ65~ZW|+6IXSJ#3L7ChJbv@Kg>|bqaS3)%?z8i&GAP0FL za1<)ZN1=|R&ue@d>IBp~BORtX2zZ1&9j3Mo){X*h@3=|b1M?By2lGCde<|RXVLl4; zY4&uQ+T$?yqO#Mi*xzZYai|x0XXn3{H8uU>I_kf}vA=i~53K3p_O<2w>>AGe IZS5h)k9T|ru>b%7 diff --git a/!NetSurf/Resources/fr/Templates,fec b/!NetSurf/Resources/fr/Templates,fec index 013b4dba43e64a2e037dbc22917be5d456a4dd35..71dc25f92ad2309419e487ceabd2b647efc92a08 100644 GIT binary patch delta 574 zcmYLFO(;ZB82#QGzl)oMuF}+_SZHX-gvKm}6iLZgDyDJAPjB9P&Af-CSWK}aV@k4O zLo7zvSy&(oTh?r>W9z&-R@q#i7? zfhn+T08Q~m2E!e)flcW0L6_jFQ{vBv-+*d(a?di*fgeqSy~;T8LzqVZ=5J94j2*-? z;7}X!H5eO!e0>h^K|e=sx&Aid13>;#c+N@T!!rjU+V|l8x2NiiNB! zEJl+R3kwT&Hfk337AznkYV5SBQ!OB_<~ z8%;Gi-0gY$xGbD&kNIj6WtmLIiwpP!cn2J&FYS%e2w-Q5kQcInbAfyZoCa$;$)V7) z84jBw585tp4*e1Q3=Vvd^93_r0qjc8Koa^7_z_%DO$qr9^8>&`Y;Zv(5>+6H-(GzI z13E7-0_Ft@h-AIc>GZm`h8LKJeh2*)`~?oQkt{@SF^~iQUilv6e}00b3rRV^8}fhy zHQ+`KsDf9gd>+6)56JqBh+CDvhZ!FD`KX&!{T=XnfqZxdbOSoiTV#J28}=g^2lz98 zLR<$rk#B+B8p$cd(*SxYxEhb)j~d|xV>51wHm_F%y)E6g)9-HZ`|8DnuepQOY~;&E Q?ODx!=xRs}`sYf20cu&b(EtDd diff --git a/!NetSurf/Resources/nl/Templates,fec b/!NetSurf/Resources/nl/Templates,fec index d882835adbac855a146bfe7f8457fc2bac6efa7a..23a12cea6ea9114f70ab2e18298bdcdbcd521c79 100644 GIT binary patch delta 569 zcmYLFJxIeq6n;tTA9(mvC4-0&6hvxiK?Nxab*P9-u?}t$YN~-WIhu%71Q!>gHi_v5fukP7o7wV92`Xv92|uD9jzGNci+43d-wA0ik|e8myWjO)*p!oLCdzC zVb&be9hYUiV_6w*7$Q2WD!VD$ngJ|5<+9rmq8;DAZdk6KWiB&DiT32O?l|VG;c!!1 zVyxb4@+tCpyx8j-i?CBaksnpLYNA)~Gt^O~mP(}yPYMNAFQgaBVHgOdCd^a^pqy^7 z=io1}B$JX%&1;&;XnI4Y73lrY8*y$PJRBiq9eExQ=T&eJ`U#j<{4M0WKy9Vx3iK|S zR%s1MyF|)9%mRQQ7r2K02>uogKB?va#vy>$p;zDzx*z*Da9bxSm&mUG1PNXEUEn|e z9{B@+pdKvZf(a>Jz9FVox*43xCkEI=f%xGWIB-nLGxB$!1)iGF<_t?y9lVOETdG$W zRFjc#m?gNIomtEpt{$D3ibZ4LzM&9flLJv_)?T!NT&(5&0uS;9&XOrKP&Lz3(^)N} TJ1l8)*G{K{f~?~8;79W>Pdl>t delta 648 zcmYLFJxc>Y6nuA4RB%Nlx`h!F`~ts7l#2w6q82Jz_*K~Hk%SmXF2TD(ZDMI*<+WmC zV_~7h(ne6Qv=qz_P*Cx!P!Qrg+~AR6-kaGsdAs-fTEW#$5A>#Gok%01?QAw9tfWZT zj<|NubUBlZ5M5OMxv{LZ3RsDlBihG^4n6;R%5oAL!V#AfL`N#kw$t&HolBcrLd4w$ zkJOu|3O$~wkT}7g{Qx&ecyQka+Vb8~spP{Pe^HIPnRz3h{zP{uV3!)u*8;7 z2iA0wOR;s+Obc4s(~0$C=vUw(IQm9akH~lia22`*PNBbY4Q>fgUcSTp0PrI=_&_}x zbwKJ^&Z92oh0Y6%fO&x$BH1Z0q`o=mSJ3&IU*KqnWF2N3feM^CSH2hhpPwfw(eMlK zh8(b~0xncQ0A82!Ie>i*DEqyrgUT-=qXT{p=T_9b0dEw*va|!;r{>q#pT>rhFlPaN z-cKF|I?!)|TQ!pNs22dtl7HSzrYzHM*%P&H~pcoJKN8C`jwQJbu6pKdR5Ub_N RC|84J&HXm~g-rOR@fWsfx5xkh diff --git a/desktop/browser.c b/desktop/browser.c index e4a1f8d49..43b702e90 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -60,6 +60,7 @@ struct browser_window *current_redraw_browser; /** fake content for being saved as a link */ struct content browser_window_href_content; +static void browser_window_set_scale_internal(struct browser_window *bw, float scale); static void browser_window_resize_frame(struct browser_window *bw, int x, int y); static bool browser_window_resolve_frame_dimension(struct browser_window *bw, struct browser_window *sibling, int x, int y, bool width, bool height); @@ -405,7 +406,8 @@ void browser_window_recalculate_frameset(struct browser_window *bw) { switch (window->frame_width.unit) { case FRAME_DIMENSION_PIXELS: - widths[col][row] = window->frame_width.value; + widths[col][row] = window->frame_width.value * + gui_window_get_scale(window->window); if (window->border) { if (col != 0) widths[col][row] += 1; @@ -466,7 +468,8 @@ void browser_window_recalculate_frameset(struct browser_window *bw) { switch (window->frame_height.unit) { case FRAME_DIMENSION_PIXELS: - heights[col][row] = window->frame_height.value; + heights[col][row] = window->frame_height.value * + gui_window_get_scale(window->window); if (window->border) { if (row != 0) heights[col][row] += 1; @@ -542,6 +545,33 @@ void browser_window_recalculate_frameset(struct browser_window *bw) { } +/** + * Sets the scale of a browser window + * + * \param bw The browser window to scale + * \param scale The new scale + * \param all Scale all windows in the tree (ie work up aswell as down) + */ +void browser_window_set_scale(struct browser_window *bw, float scale, bool all) { + while (bw->parent && all) + bw = bw->parent; + browser_window_set_scale_internal(bw, scale); +} + +void browser_window_set_scale_internal(struct browser_window *bw, float scale) { + int i; + + gui_window_set_scale(bw->window, scale); + + for (i = 0; i < (bw->cols * bw->rows); i++) + browser_window_set_scale_internal(&bw->children[i], scale); + for (i = 0; i < bw->iframe_count; i++) + browser_window_set_scale_internal(&bw->iframes[i], scale); + if (bw->children) + browser_window_recalculate_frameset(bw); +} + + /** * Resize a browser window that is a frame. * diff --git a/desktop/browser.h b/desktop/browser.h index b9516c78b..f85fb03bc 100644 --- a/desktop/browser.h +++ b/desktop/browser.h @@ -199,6 +199,7 @@ void browser_window_recalculate_iframes(struct browser_window *bw); void browser_window_create_frameset(struct browser_window *bw, struct content_html_frames *frameset); void browser_window_recalculate_frameset(struct browser_window *bw); +void browser_window_set_scale(struct browser_window *bw, float scale, bool all); void browser_window_mouse_click(struct browser_window *bw, browser_mouse_state mouse, int x, int y); diff --git a/desktop/gui.h b/desktop/gui.h index b50fe82ed..bcce94272 100644 --- a/desktop/gui.h +++ b/desktop/gui.h @@ -84,6 +84,8 @@ bool gui_window_box_scroll_start(struct gui_window *g, int x0, int y0, int x1, int y1); bool gui_window_frame_resize_start(struct gui_window *g); void gui_window_save_as_link(struct gui_window *g, struct content *c); +float gui_window_get_scale(struct gui_window *g); +void gui_window_set_scale(struct gui_window *g, float scale); struct gui_download_window *gui_download_window_create(const char *url, const char *mime_type, struct fetch *fetch, diff --git a/riscos/dialog.c b/riscos/dialog.c index 2f83c1496..e16fdeb24 100644 --- a/riscos/dialog.c +++ b/riscos/dialog.c @@ -40,6 +40,13 @@ #include "netsurf/utils/url.h" #include "netsurf/utils/utils.h" +#define ICON_ZOOM_VALUE 1 +#define ICON_ZOOM_DEC 2 +#define ICON_ZOOM_INC 3 +#define ICON_ZOOM_FRAMES 5 +#define ICON_ZOOM_CANCEL 7 +#define ICON_ZOOM_OK 8 + /* The maximum number of persistent dialogues */ #define MAX_PERSISTENT 64 @@ -66,7 +73,6 @@ static struct { static bool ro_gui_dialog_openurl_apply(wimp_w w); -static bool ro_gui_dialog_zoom_click(wimp_pointer *pointer); static bool ro_gui_dialog_zoom_apply(wimp_w w); /** @@ -193,8 +199,7 @@ void ro_gui_dialog_init(void) dialog_zoom = ro_gui_dialog_create("zoom"); ro_gui_wimp_event_register_numeric_field(dialog_zoom, ICON_ZOOM_VALUE, ICON_ZOOM_INC, ICON_ZOOM_DEC, 10, 1600, 10, 0); - ro_gui_wimp_event_register_mouse_click(dialog_zoom, - ro_gui_dialog_zoom_click); + ro_gui_wimp_event_register_checkbox(dialog_zoom, ICON_ZOOM_FRAMES); ro_gui_wimp_event_register_cancel(dialog_zoom, ICON_ZOOM_CANCEL); ro_gui_wimp_event_register_ok(dialog_zoom, ICON_ZOOM_OK, ro_gui_dialog_zoom_apply); @@ -654,39 +659,13 @@ void ro_gui_save_options(void) options_write(""); } - -/** - * Handle clicks in the Scale view dialog. - */ - -bool ro_gui_dialog_zoom_click(wimp_pointer *pointer) -{ - switch (pointer->i) { - case ICON_ZOOM_75: - ro_gui_set_icon_integer(dialog_zoom, - ICON_ZOOM_VALUE, 75); - return true; - case ICON_ZOOM_100: - ro_gui_set_icon_integer(dialog_zoom, - ICON_ZOOM_VALUE, 100); - return true; - case ICON_ZOOM_150: - ro_gui_set_icon_integer(dialog_zoom, - ICON_ZOOM_VALUE, 150); - return true; - case ICON_ZOOM_200: - ro_gui_set_icon_integer(dialog_zoom, - ICON_ZOOM_VALUE, 200); - return true; - } - return false; -} - bool ro_gui_dialog_zoom_apply(wimp_w w) { unsigned int scale; + bool all; scale = atoi(ro_gui_get_icon_string(w, ICON_ZOOM_VALUE)); - ro_gui_window_set_scale(ro_gui_current_zoom_gui, scale * 0.01); + all = ro_gui_get_icon_selected_state(w, ICON_ZOOM_FRAMES); + browser_window_set_scale(ro_gui_current_zoom_gui->bw, scale * 0.01, all); return true; } @@ -700,7 +679,9 @@ void ro_gui_dialog_prepare_zoom(struct gui_window *g) char scale_buffer[8]; sprintf(scale_buffer, "%.0f", g->option.scale * 100); ro_gui_set_icon_string(dialog_zoom, ICON_ZOOM_VALUE, scale_buffer); - + ro_gui_set_icon_selected_state(dialog_zoom, ICON_ZOOM_FRAMES, true); + ro_gui_set_icon_shaded_state(dialog_zoom, ICON_ZOOM_FRAMES, + !(g->bw->parent)); ro_gui_current_zoom_gui = g; ro_gui_wimp_event_memorise(dialog_zoom); } diff --git a/riscos/gui.h b/riscos/gui.h index ea63558b0..ab31e7b1d 100644 --- a/riscos/gui.h +++ b/riscos/gui.h @@ -158,7 +158,6 @@ bool ro_gui_shift_pressed(void); bool ro_gui_ctrl_pressed(void); void ro_gui_window_scroll_end(struct gui_window *g, wimp_dragged *drag); void ro_gui_window_frame_resize_end(struct gui_window *g, wimp_dragged *drag); -void ro_gui_window_set_scale(struct gui_window *g, float scale); void ro_gui_window_iconise(struct gui_window *g, wimp_full_message_window_info *wi); bool ro_gui_window_navigate_up(struct gui_window *g, const char *url); @@ -222,16 +221,6 @@ bool ro_gui_theme_install_apply(wimp_w w); #define ICON_STATUS_RESIZE 0 #define ICON_STATUS_TEXT 1 -#define ICON_ZOOM_VALUE 1 -#define ICON_ZOOM_DEC 2 -#define ICON_ZOOM_INC 3 -#define ICON_ZOOM_75 5 -#define ICON_ZOOM_100 6 -#define ICON_ZOOM_150 7 -#define ICON_ZOOM_200 8 -#define ICON_ZOOM_CANCEL 9 -#define ICON_ZOOM_OK 10 - #define ICON_SAVE_ICON 0 #define ICON_SAVE_PATH 1 #define ICON_SAVE_OK 2 diff --git a/riscos/window.c b/riscos/window.c index 63ce6ee74..efa121de9 100644 --- a/riscos/window.c +++ b/riscos/window.c @@ -1349,6 +1349,57 @@ bool gui_window_frame_resize_start(struct gui_window *g) } +/** + * Save the specified content as a link. + * + * \param g gui_window containing the content + * \param c the content to save + */ + +void gui_window_save_as_link(struct gui_window *g, struct content *c) +{ + if (!c) + return; + ro_gui_save_prepare(GUI_SAVE_LINK_URL, c); + ro_gui_dialog_open_persistent(g->window, dialog_saveas, true); +} + + +/** + * Get the scale setting of a window + * + * \param g gui window + * \return scale value (1.0 == normal scale) + */ + +float gui_window_get_scale(struct gui_window *g) +{ + return g->option.scale; +} + + +/** + * Set the scale setting of a window + * + * \param g gui window + * \param scale scale value (1.0 == normal scale) + */ + +void gui_window_set_scale(struct gui_window *g, float scale) +{ + struct content *c; + + if (g->option.scale == scale) + return; + g->option.scale = scale; + g->reformat_pending = true; + c = g->bw->current_content; + if ((c) && (c->type != CONTENT_HTML)) + browser_window_update(g->bw, false); + gui_reformat_pending = true; +} + + /** * Redraws the content for all windows. */ @@ -1635,16 +1686,14 @@ void ro_gui_window_open(wimp_open *open) struct gui_window *g = (struct gui_window *)ro_gui_wimp_event_get_user_data(open->w); int width = open->visible.x1 - open->visible.x0; int height = open->visible.y1 - open->visible.y0; - int toolbar_height = 0; + int size, fheight, fwidth, toolbar_height = 0; + bool no_vscroll, no_hscroll; + float new_scale = 0; struct content *content; wimp_window_state state; os_error *error; - int key_down = 0; wimp_w parent; bits linkage; - int size; - bool no_vscroll, no_hscroll; - int fheight, fwidth; if (open->next == wimp_TOP && g->iconise_icon >= 0) { /* window is no longer iconised, release its sprite number */ @@ -1759,15 +1808,13 @@ void ro_gui_window_open(wimp_open *open) /* change extent if necessary */ if (g->old_width != width || g->old_height != height) { if (content) { - if (g->old_width != width) { - xosbyte1(osbyte_SCAN_KEYBOARD, 1 ^ 0x80, 0, &key_down); - if (key_down) - g->option.scale = (g->option.scale * width) / g->old_width; - }; + /* Ctrl-resize of a top-level window scales the content size */ + if ((g->old_width > 0) && (g->old_width != width) && (!g->bw->parent) && + (ro_gui_ctrl_pressed())) + new_scale = (g->option.scale * width) / g->old_width; g->reformat_pending = true; gui_reformat_pending = true; } - g->old_width = width; g->old_height = height; @@ -1797,11 +1844,17 @@ void ro_gui_window_open(wimp_open *open) return; } + /* update the toolbar */ if (g->toolbar) { ro_gui_theme_process_toolbar(g->toolbar, -1); /* second resize updates to the new URL bar width */ ro_gui_url_complete_resize(g, open); } + + /* set the new scale from a ctrl-resize. this must be done at the end as + * it may cause a frameset recalculation based on the new window size. */ + if (new_scale > 0) + browser_window_set_scale(g->bw, new_scale, true); } @@ -3062,22 +3115,6 @@ void ro_gui_window_scroll_end(struct gui_window *g, wimp_dragged *drag) } -/** - * Save the specified content as a link. - * - * \param g gui_window containing the content - * \param c the content to save - */ - -void gui_window_save_as_link(struct gui_window *g, struct content *c) -{ - if (!c) - return; - ro_gui_save_prepare(GUI_SAVE_LINK_URL, c); - ro_gui_dialog_open_persistent(g->window, dialog_saveas, true); -} - - /** * Completes resizing of a browser frame * @@ -3090,26 +3127,6 @@ void ro_gui_window_frame_resize_end(struct gui_window *g, wimp_dragged *drag) ro_gui_window_scroll_end(g, drag); } - -/** - * Alter the scale setting of a window - * - * \param g gui window - * \param scale scale value (1.0 == normal scale) - */ - -void ro_gui_window_set_scale(struct gui_window *g, float scale) -{ - struct content *c; - g->option.scale = scale; - g->reformat_pending = true; - c = g->bw->current_content; - if ((c) && (c->type != CONTENT_HTML)) - browser_window_update(g->bw, false); - gui_reformat_pending = true; -} - - /** * Import text file into window or its toolbar *