Add Zoom support to browser views
authorThomas Berezansky <tsbere@mvlc.org>
Tue, 8 May 2012 14:56:08 +0000 (10:56 -0400)
committerMike Rylander <mrylander@gmail.com>
Thu, 12 Sep 2013 17:39:19 +0000 (13:39 -0400)
Currently tied to CTRL with +/-/0 like Firefox uses.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/xul/staff_client/chrome/content/util/browser.xul
Open-ILS/xul/staff_client/chrome/content/util/rbrowser.xul

index 9cf55cb..616c63b 100644 (file)
         <command id="cmd_back" label="&common.browser.backward.label;" accesskey="&common.browser.backward.accesskey;" />
         <command id="cmd_reload" label="&common.browser.reload.label;" accesskey="&common.browser.reload.accesskey;" />
         <command id="cmd_forward" label="&common.browser.forward.label;" accesskey="&common.browser.forward.accesskey;" />
         <command id="cmd_back" label="&common.browser.backward.label;" accesskey="&common.browser.backward.accesskey;" />
         <command id="cmd_reload" label="&common.browser.reload.label;" accesskey="&common.browser.reload.accesskey;" />
         <command id="cmd_forward" label="&common.browser.forward.label;" accesskey="&common.browser.forward.accesskey;" />
+        <command id="cmd_zoom_in" oncommand="g.browser.controller.view.browser_browser.markupDocumentViewer.fullZoom += 0.1;" />
+        <command id="cmd_zoom_out" oncommand="g.browser.controller.view.browser_browser.markupDocumentViewer.fullZoom -= 0.1;" />
+        <command id="cmd_zoom_reset" oncommand="g.browser.controller.view.browser_browser.markupDocumentViewer.fullZoom = 1;" />
     </commandset>
 
     </commandset>
 
+    <keyset>
+        <key key="-" command="cmd_zoom_out"   modifiers="accel"/>
+        <key key="+" command="cmd_zoom_in"    modifiers="accel"/>
+        <key key="=" command="cmd_zoom_in"    modifiers="accel"/>
+        <key key="0" command="cmd_zoom_reset" modifiers="accel"/>
+    </keyset>
+
     <popupset>
         <menupopup id="debug_popup">
             <menuitem label="&common.browser.view_source.label;" accesskey="&common.browser.view_source.accesskey;" command="cmd_view_source" />
     <popupset>
         <menupopup id="debug_popup">
             <menuitem label="&common.browser.view_source.label;" accesskey="&common.browser.view_source.accesskey;" command="cmd_view_source" />
index 43b2181..8c7f527 100644 (file)
         <command id="cmd_back" label="&common.browser.backward.label;" accesskey="&common.browser.backward.accesskey;" />
         <command id="cmd_reload" label="&common.browser.reload.label;" accesskey="&common.browser.reload.accesskey;" />
         <command id="cmd_forward" label="&common.browser.forward.label;" accesskey="&common.browser.forward.accesskey;" />
         <command id="cmd_back" label="&common.browser.backward.label;" accesskey="&common.browser.backward.accesskey;" />
         <command id="cmd_reload" label="&common.browser.reload.label;" accesskey="&common.browser.reload.accesskey;" />
         <command id="cmd_forward" label="&common.browser.forward.label;" accesskey="&common.browser.forward.accesskey;" />
+        <command id="cmd_zoom_in" oncommand="g.browser.controller.view.browser_browser.markupDocumentViewer.fullZoom += 0.1;" />
+        <command id="cmd_zoom_out" oncommand="g.browser.controller.view.browser_browser.markupDocumentViewer.fullZoom -= 0.1;" />
+        <command id="cmd_zoom_reset" oncommand="g.browser.controller.view.browser_browser.markupDocumentViewer.fullZoom = 1;" />
     </commandset>
 
     </commandset>
 
+    <keyset>
+        <key key="-" command="cmd_zoom_out"   modifiers="accel"/>
+        <key key="+" command="cmd_zoom_in"    modifiers="accel"/>
+        <key key="=" command="cmd_zoom_in"    modifiers="accel"/>
+        <key key="0" command="cmd_zoom_reset" modifiers="accel"/>
+    </keyset>
+
     <popupset>
         <menupopup id="debug_popup">
             <menuitem label="&common.browser.view_source.label;" accesskey="&common.browser.view_source.accesskey;" command="cmd_view_source" />
     <popupset>
         <menupopup id="debug_popup">
             <menuitem label="&common.browser.view_source.label;" accesskey="&common.browser.view_source.accesskey;" command="cmd_view_source" />