mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-17 16:19:18 +03:00
[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
This commit is contained in:
parent
bdbd46584f
commit
0ebbc1330c
@ -626,7 +626,8 @@ void ro_gui_dialog_click_zoom(wimp_pointer *pointer)
|
|||||||
|
|
||||||
/* Adjust moves values the opposite direction
|
/* 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) {
|
switch (pointer->i) {
|
||||||
case ICON_ZOOM_DEC: scale -= stepping; break;
|
case ICON_ZOOM_DEC: scale -= stepping; break;
|
||||||
@ -639,8 +640,8 @@ void ro_gui_dialog_click_zoom(wimp_pointer *pointer)
|
|||||||
|
|
||||||
if (scale < 10)
|
if (scale < 10)
|
||||||
scale = 10;
|
scale = 10;
|
||||||
else if (500 < scale)
|
else if (1000 < scale)
|
||||||
scale = 500;
|
scale = 1000;
|
||||||
ro_gui_set_icon_integer(dialog_zoom, ICON_ZOOM_VALUE, scale);
|
ro_gui_set_icon_integer(dialog_zoom, ICON_ZOOM_VALUE, scale);
|
||||||
|
|
||||||
if (pointer->i == ICON_ZOOM_OK) {
|
if (pointer->i == ICON_ZOOM_OK) {
|
||||||
|
@ -944,16 +944,20 @@ bool ro_gui_window_keypress(gui_window *g, int key, bool toolbar)
|
|||||||
|
|
||||||
case 17: /* CTRL+Q (Zoom out) */
|
case 17: /* CTRL+Q (Zoom out) */
|
||||||
current_gui = g;
|
current_gui = g;
|
||||||
if (current_gui->scale > 0.1) {
|
if (0.1 < current_gui->scale) {
|
||||||
current_gui->scale -= 0.1;
|
current_gui->scale -= 0.1;
|
||||||
|
if (current_gui->scale < 0.1)
|
||||||
|
current_gui->scale = 0.1;
|
||||||
current_gui->data.browser.reformat_pending = true;
|
current_gui->data.browser.reformat_pending = true;
|
||||||
gui_reformat_pending = true;
|
gui_reformat_pending = true;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
case 23: /* CTRL+W (Zoom in) */
|
case 23: /* CTRL+W (Zoom in) */
|
||||||
current_gui = g;
|
current_gui = g;
|
||||||
if (current_gui->scale < 5) {
|
if (current_gui->scale < 10.0) {
|
||||||
current_gui->scale += 0.1;
|
current_gui->scale += 0.1;
|
||||||
|
if (10.0 < current_gui->scale)
|
||||||
|
current_gui->scale = 10.0;
|
||||||
current_gui->data.browser.reformat_pending = true;
|
current_gui->data.browser.reformat_pending = true;
|
||||||
gui_reformat_pending = true;
|
gui_reformat_pending = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user