summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2004-06-12 17:43:37 +0000
committerJames Bursa <james@netsurf-browser.org>2004-06-12 17:43:37 +0000
commit0ebbc1330c4881dcbe2db1bc10dcf9ba1d3b915c (patch)
tree1388fcc6e29dcbb53b84117627dc2f8e0a2a491e
parentbdbd46584f9a1342da4972e557bd5a08bf0b5cb7 (diff)
downloadnetsurf-0ebbc1330c4881dcbe2db1bc10dcf9ba1d3b915c.tar.gz
netsurf-0ebbc1330c4881dcbe2db1bc10dcf9ba1d3b915c.tar.bz2
[project @ 2004-06-12 17:43:37 by bursa]
Fix limit zooming by ^Q / ^W. Increase limit to 1000. svn path=/import/netsurf/; revision=967
-rw-r--r--riscos/dialog.c7
-rw-r--r--riscos/window.c8
2 files changed, 10 insertions, 5 deletions
diff --git a/riscos/dialog.c b/riscos/dialog.c
index 47c279515..74af5d21c 100644
--- a/riscos/dialog.c
+++ b/riscos/dialog.c
@@ -626,7 +626,8 @@ void ro_gui_dialog_click_zoom(wimp_pointer *pointer)
/* Adjust moves values the opposite direction
*/
- if (pointer->buttons == wimp_CLICK_ADJUST) stepping = -stepping;
+ if (pointer->buttons == wimp_CLICK_ADJUST)
+ stepping = -stepping;
switch (pointer->i) {
case ICON_ZOOM_DEC: scale -= stepping; break;
@@ -639,8 +640,8 @@ void ro_gui_dialog_click_zoom(wimp_pointer *pointer)
if (scale < 10)
scale = 10;
- else if (500 < scale)
- scale = 500;
+ else if (1000 < scale)
+ scale = 1000;
ro_gui_set_icon_integer(dialog_zoom, ICON_ZOOM_VALUE, scale);
if (pointer->i == ICON_ZOOM_OK) {
diff --git a/riscos/window.c b/riscos/window.c
index 8270088bf..aeef7b557 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -944,16 +944,20 @@ bool ro_gui_window_keypress(gui_window *g, int key, bool toolbar)
case 17: /* CTRL+Q (Zoom out) */
current_gui = g;
- if (current_gui->scale > 0.1) {
+ if (0.1 < current_gui->scale) {
current_gui->scale -= 0.1;
+ if (current_gui->scale < 0.1)
+ current_gui->scale = 0.1;
current_gui->data.browser.reformat_pending = true;
gui_reformat_pending = true;
}
return true;
case 23: /* CTRL+W (Zoom in) */
current_gui = g;
- if (current_gui->scale < 5) {
+ if (current_gui->scale < 10.0) {
current_gui->scale += 0.1;
+ if (10.0 < current_gui->scale)
+ current_gui->scale = 10.0;
current_gui->data.browser.reformat_pending = true;
gui_reformat_pending = true;
}