From b01041e45523a8d8549d9b2b3110e3cf9967ceea Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 22 Dec 2014 18:04:28 +0100 Subject: [PATCH] Set zoom to default instead of 100% with :zoom/=. --- doc/help/commands.asciidoc | 2 +- qutebrowser/browser/commands.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/help/commands.asciidoc b/doc/help/commands.asciidoc index 12215e3b2..a1c5e9e45 100644 --- a/doc/help/commands.asciidoc +++ b/doc/help/commands.asciidoc @@ -508,7 +508,7 @@ Syntax: +:zoom ['zoom']+ Set the zoom level for the current tab. -The zoom can be given as argument or as [count]. If neither of both is given, the zoom is set to 100%. +The zoom can be given as argument or as [count]. If neither of both is given, the zoom is set to the default zoom. ==== positional arguments * +'zoom'+: The zoom percentage to set. diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index 9f0792629..0a6e280fc 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -619,14 +619,15 @@ class CommandDispatcher: """Set the zoom level for the current tab. The zoom can be given as argument or as [count]. If neither of both is - given, the zoom is set to 100%. + given, the zoom is set to the default zoom. Args: zoom: The zoom percentage to set. count: The zoom percentage to set. """ try: - level = cmdutils.arg_or_count(zoom, count, default=100) + default = config.get('ui', 'default-zoom') + level = cmdutils.arg_or_count(zoom, count, default=default) except ValueError as e: raise cmdexc.CommandError(e) tab = self._current_widget()