Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
path: root/webactivity.py
diff options
authorManuel Kaufmann <humitos@gmail.com>2012-04-29 15:45:22 (GMT)
committer Manuel QuiƱones <manuq@laptop.org>2012-09-10 18:50:45 (GMT)
commit02aa9d5b8890d47b23fa4150e1f33910d646a1c0 (patch)
tree27af5e61be9d388886db44fb98515f8d76515943 /webactivity.py
parenta8d8738af9c3c1fdd3e692712fb46e6e1b1fb6be (diff)
Revert zoom with the original value SL #3540
New functionality to go back to the original zoom value. Added an icon next to zoom properties in View Toolbar. This function can be used with the hotkey "Control + 0" as well. Signed-off-by: Manuel Kaufmann <humitos@gmail.com> Acked-by: Manuel QuiƱones <manuq@laptop.org> Acked-by: Simon Schampijer <simon@laptop.org>
Diffstat (limited to 'webactivity.py')
1 files changed, 4 insertions, 0 deletions
diff --git a/webactivity.py b/webactivity.py
index fb1a451..24f3b44 100644
--- a/webactivity.py
+++ b/webactivity.py
@@ -125,6 +125,7 @@ def _set_char_preference(name, value):
from browser import TabbedView
+from browser import ZOOM_ORIGINAL
from webtoolbar import PrimaryToolbar
from edittoolbar import EditToolbar
from viewtoolbar import ViewToolbar
@@ -445,6 +446,9 @@ class WebActivity(activity.Activity):
elif key_name in ['plus', 'equal']:
_logger.debug('keyboard: Zoom in')
+ elif key_name == '0':
+ _logger.debug('keyboard: Actual size')
+ browser.set_zoom_level(ZOOM_ORIGINAL)
elif key_name == 'Left':
_logger.debug('keyboard: Go back')