summaryrefslogtreecommitdiff
path: root/amiga
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2015-11-15 14:07:25 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2015-11-15 14:07:25 +0000
commit0feb291c2e3041004b676ddd56301beaf78851a5 (patch)
tree982bde4f2c8335730cd20c8d90ee5a83beb37784 /amiga
parentbf6d56c7fe14029ed1a04111bfa1bc53414707c2 (diff)
downloadnetsurf-0feb291c2e3041004b676ddd56301beaf78851a5.tar.gz
netsurf-0feb291c2e3041004b676ddd56301beaf78851a5.tar.bz2
Add F8/F9/F10 as shortcuts to the scale functionality
Diffstat (limited to 'amiga')
-rwxr-xr-xamiga/dist/NetSurf.guide43
-rw-r--r--amiga/gui.c13
-rw-r--r--amiga/menu.c3
3 files changed, 36 insertions, 23 deletions
diff --git a/amiga/dist/NetSurf.guide b/amiga/dist/NetSurf.guide
index 5db267af9..aa5b66def 100755
--- a/amiga/dist/NetSurf.guide
+++ b/amiga/dist/NetSurf.guide
@@ -336,7 +336,7 @@ The Installer script will set the MIMETYPE tooltype on basic relevant default fi
This is a list of the keyboard shortcuts used in NetSurf
- RAmiga + R or F5 (reload the current page)
-- PageUp/Down (scroll up/down to one page)
+- PageUp/Down/Space (scroll up/down to one page)
- Home/End (go to top/bottom of the page)
- Left/Right/Up/Down (scroll the page)
- RAmiga + U (activate the URL bar)
@@ -345,26 +345,27 @@ This is a list of the keyboard shortcuts used in NetSurf
Keyboard shortcuts used in NetSurf menu
-- RAmiga + N (open a new window)
-- RAmiga + T (open a new tab)
-- RAmiga + O (open a local file)
-- RAmiga + S (save source page)
-- RAmiga + K (close current tab)
-- RAmiga + P (print a page)
-- RAmiga + ? (about NetSurf)
-- RAmiga + Q (quit NetSurf)
-- RAmiga + X (cut)
-- RAmiga + C (copy)
-- RAmiga + V (paste)
-- RAmiga + A (select all)
-- RAmiga + Z (clear selection)
-- RAmiga + F (find a string/text)
-- RAmiga + - (decrease font)
-- RAmiga + = (normal font)
-- RAmiga + + (increase font)
-- RAmiga + B (add link to bookmark)
-- RAmiga + H (show bookmarks)
-- RAmiga + E (execute script)
+- RAmiga + N (open a new window)
+- RAmiga + T (open a new tab)
+- RAmiga + O (open a local file)
+- RAmiga + S (save source page)
+- RAmiga + K (close current tab)
+- RAmiga + P (print a page)
+- RAmiga + ? (about NetSurf)
+- RAmiga + Q (quit NetSurf)
+- RAmiga + X (cut)
+- RAmiga + C (copy)
+- RAmiga + V (paste)
+- RAmiga + A (select all)
+- RAmiga + Z (undo)
+- RAmiga + Y (redo)
+- RAmiga + F (find a string/text)
+- RAmiga + - or F9 (decrease scale)
+- RAmiga + = or F8 (normal scale)
+- RAmiga + + or F10 (increase scale)
+- RAmiga + B (add link to bookmark)
+- RAmiga + H (show bookmarks)
+- RAmiga + E (execute script)
@endnode
diff --git a/amiga/gui.c b/amiga/gui.c
index 9d5aeb008..160795e45 100644
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -2337,6 +2337,18 @@ static void ami_handle_msg(void)
if(browser_window_reload_available(gwin->gw->bw))
browser_window_reload(gwin->gw->bw,false);
break;
+
+ case RAWKEY_F8: // scale 100%
+ ami_gui_set_scale(gwin->gw, 1.0);
+ break;
+
+ case RAWKEY_F9: // decrease scale
+ ami_gui_set_scale(gwin->gw, gwin->gw->scale - 0.1);
+ break;
+
+ case RAWKEY_F10: // increase scale
+ ami_gui_set_scale(gwin->gw, gwin->gw->scale + 0.1);
+ break;
case RAWKEY_HELP: // help
ami_help_open(AMI_HELP_GUI, scrn);
@@ -3334,6 +3346,7 @@ int ami_gui_count_windows(int window, int *tabs)
*/
void ami_gui_set_scale(struct gui_window *gw, float scale)
{
+ if(scale <= 0.0) return;
gw->scale = scale;
browser_window_set_scale(gw->bw, scale, true);
}
diff --git a/amiga/menu.c b/amiga/menu.c
index 25345d039..6d885dce7 100644
--- a/amiga/menu.c
+++ b/amiga/menu.c
@@ -379,8 +379,7 @@ HOOKF(void, ami_menu_item_browser_scale_decrease, APTR, window, struct IntuiMess
struct gui_window_2 *gwin;
GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);
- if(gwin->gw->scale > 0.1)
- ami_gui_set_scale(gwin->gw, gwin->gw->scale - 0.1);
+ ami_gui_set_scale(gwin->gw, gwin->gw->scale - 0.1);
}
HOOKF(void, ami_menu_item_browser_scale_normal, APTR, window, struct IntuiMessage *)