After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 725118 - GTK applications should support a universal "zoom" key
GTK applications should support a universal "zoom" key
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other All
: Normal enhancement
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on: 720502
Blocks:
 
 
Reported: 2014-02-25 02:25 UTC by HyperHacker
Modified: 2018-01-17 03:36 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description HyperHacker 2014-02-25 02:25:18 UTC
In web browsers you can press Ctrl+Plus and Ctrl+Minus (or use Ctrl+Mousewheel) to zoom in and out of a page. This is entirely transparent and works on any page. It's not simply scaling up the rendered image, but actually scales the width, height, text size, etc of everything in the page (which can cause the layout of elements to change, and may even trigger alternate stylesheets based on the lower reported window size).

GTK+ should support the same. It should be possible, in any GTK+ application, to zoom the app in and out using some universal shortcut key. This seems like it should be relatively trivial to implement - just multiply all widgets' dimensions, font sizes, borders etc by the zoom factor, and maybe change the reported window size to keep layouts correct. In fact if GTK+ supports varying DPI already, I'd think zooming would just be a matter of changing the DPI.

The use for this would be for accessibility (for people who have somewhat poor eyesight and need to zoom in a little, but not bad enough to justify permanently increasing the font size system-wide) and for a "10-foot UI" (I like to watch live video streams from the couch; some of these have an IRC channel, and I'd love to zoom in the IRC app so that I can read chat from the couch as well).

Maybe also interesting is the possibility to scale individual widgets. (Maybe Ctrl+Shift+Mousewheel over the desired widget?) e.g. you could scale up just the text field in a text editor (to give the same effect as changing the font size, but temporarily), or the one button you have to click often, while not having gigantic menus and controls.
Comment 1 Matthias Clasen 2014-03-04 03:13:32 UTC
are you planning to work on this idea ?
Comment 2 Daniel Boles 2017-10-09 13:44:17 UTC
(In reply to HyperHacker from comment #0)
> This seems like it should be relatively trivial to implement - just multiply
> all widgets' dimensions, font sizes, borders etc by the zoom factor, and
> maybe change the reported window size to keep layouts correct.

Let us know how you get on! But really, I doubt it'll be quite that simple. Anyway, that part of it either depends on, or is a dupe of, [1].

That said, there's another way to do this, which isn't just scaling but could act like it if you want: implement enough CSS to override our themes' currently all fixed size [2], then configure dynamic updating of the base font size.

related bugs:
[1] non-integer scaling factors: https://bugzilla.gnome.org/show_bug.cgi?id=720502
[2] relative sizes in our themes: https://bugzilla.gnome.org/show_bug.cgi?id=761435
Comment 3 Matthias Clasen 2018-01-17 03:36:25 UTC
with no concrete plans to work on this, and no patches, no point in keepin gthis open forever