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 755784 - Easier keyboard shortcuts for zoom
Easier keyboard shortcuts for zoom
Status: RESOLVED FIXED
Product: gnome-maps
Classification: Applications
Component: general
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-maps-maint
gnome-maps-maint
Depends on:
Blocks:
 
 
Reported: 2015-09-29 10:29 UTC by Allan Day
Modified: 2016-09-02 19:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Using plus and minus only for zoom in and zoom out purpose (1.19 KB, patch)
2015-10-27 06:02 UTC, amisha
none Details | Review
Using plus and minus along with ctrl++ and ctr-l- for zoom in and zoom out purpose (1.23 KB, patch)
2015-10-28 11:25 UTC, amisha
none Details | Review
Using plus and minus along with ctrl++ and ctrl-- for zoom in and zoom out purpose (1.17 KB, patch)
2015-10-28 15:52 UTC, amisha
none Details | Review
MainWindow: Add simpler zoom accels (1.16 KB, patch)
2015-10-28 16:40 UTC, Jonas Danielsson
committed Details | Review
Add zoom in accel for equal (1.58 KB, patch)
2016-04-06 16:07 UTC, Razvan Brinzea
committed Details | Review
Help overlay with equal accel (24.30 KB, image/png)
2016-04-20 15:12 UTC, Razvan Brinzea
  Details

Description Allan Day 2015-09-29 10:29:49 UTC
The shortcuts for zoom in and out are currently Ctrl++ and Ctrl+-. This seems unnecessarily difficult: why not just allow -, +, and = for zooming?

This is what a lot of image apps do, as well as maps applications.
Comment 1 Jonas Danielsson 2015-10-02 05:44:37 UTC
Thanks for filing this!

This should be an easy first task for somebody wanting to contribute to GNOME!
You should look around in mainWindow.js, https://git.gnome.org/browse/gnome-maps/tree/src/mainWindow.js#n142. And there you could update the shortcut. Maybe read-up on https://developer.gnome.org/gio/stable/GSimpleAction.html.

Allan: Do you feel that the Ctrl versions should be dropped or that both shortcuts should work?
Comment 2 amisha 2015-10-09 14:24:40 UTC
Hi Jonas, Should I start working upon this one?
Comment 3 Zeeshan Ali 2015-10-09 16:21:09 UTC
(In reply to amisha from comment #2)
> Hi Jonas, Should I start working upon this one?

It's open source, anyone can work on anything. :)
Comment 4 Jonas Danielsson 2015-10-13 13:00:14 UTC
(In reply to amisha from comment #2)
> Hi Jonas, Should I start working upon this one?

That would be awesome! Do you need more information than given in comment 1 above?

Allan: Do you think the ctrl++ and ctrl+- should remain along side the - and + or should they be replaced?
Comment 5 amisha 2015-10-27 06:02:48 UTC
Created attachment 314184 [details] [review]
Using plus and minus only for zoom in and zoom out purpose
Comment 6 Jonas Danielsson 2015-10-27 06:34:44 UTC
Review of attachment 314184 [details] [review]:

Thanks!

I think the commit message can be improved. No need to have Gnome-maps in there. That is clear from where you are. Instead I think it should be something like 'MainWindow: Add simpler zoom accels'.
And no need to talk about a task. Maybe just say it is simpler to have just plus and minus.

You can look here for more guidence:
https://wiki.gnome.org/Git/CommitMessages

Nice work!

::: src/mainWindow.js
@@ -190,3 @@
             },
             'zoom-in': {
-                accels: ['<Primary>plus'],

Looks nice! I think tho that maybe we can keep both? Other applications seem to do that.
So this would become:

accels: ['<Primary>plus', 'plus'], ...

and same for minus. What do you think?
Comment 7 amisha 2015-10-27 06:39:21 UTC
Okay. I will work upon the commit message. And regarding the latter one, i think we should discuss it with andreasn.He may help us better.
Comment 8 Jonas Danielsson 2015-10-27 06:43:14 UTC
Adding Adreas to cc.
Comment 9 Andreas Nilsson 2015-10-28 11:08:10 UTC
In order to keep consistency with Terminal, Evince, Documents, Nautilus etc. keeping ctrl++ and ctrl+- in addition to just + and - is probably sane.
Otherwise we'll end up with the situation where someone who's used to those apps tries to do that in Maps too and goes "Huh? Why didn't the regular zoom controls that I know from other apps work here? Is zoom broken?"
Comment 10 amisha 2015-10-28 11:25:19 UTC
Created attachment 314306 [details] [review]
Using plus and minus along with ctrl++ and ctr-l- for zoom in and zoom out purpose
Comment 11 Jonas Danielsson 2015-10-28 11:45:17 UTC
Review of attachment 314306 [details] [review]:

Awesome! Thanks!

It seems that the commit message got a bit mangled?

Could you send a new version with a cleaner commit message? Seem you forgot some new-lines?


For ease of user,both
 plus/minus and ctrl+/ctrl- are kept as keyboard shortcut for zoom-in/zoom-out
 purpose

Maybe just: "Added zoom accels for plus and minus." as commit message body?
The subject looks fine!

::: src/mainWindow.js
@@ +194,3 @@
             },
             'zoom-out': {
+                accels: ['minus', '<Ctrl>minus', 'KP_Subtract', '<Ctrl>KP_Subtract'],

Why the change from <Primary> to <Ctrl>?
Comment 12 amisha 2015-10-28 15:52:45 UTC
Created attachment 314328 [details] [review]
Using plus and minus along with ctrl++ and ctrl-- for zoom in and zoom out purpose
Comment 13 amisha 2015-10-28 15:54:01 UTC
(In reply to Jonas Danielsson from comment #11)
> Review of attachment 314306 [details] [review] [review]:
> 
> Awesome! Thanks!
> 
> It seems that the commit message got a bit mangled?
> 
> Could you send a new version with a cleaner commit message? Seem you forgot
> some new-lines?
> 
> 
> For ease of user,both
>  plus/minus and ctrl+/ctrl- are kept as keyboard shortcut for
> zoom-in/zoom-out
>  purpose
> 
> Maybe just: "Added zoom accels for plus and minus." as commit message body?
> The subject looks fine!
> 
> ::: src/mainWindow.js
> @@ +194,3 @@
>              },
>              'zoom-out': {
> +                accels: ['minus', '<Ctrl>minus', 'KP_Subtract',
> '<Ctrl>KP_Subtract'],
> 
> Why the change from <Primary> to <Ctrl>?

Actually I followed that one from evince code.Anyways I have made it to primary only in the latest patch and that's working fine.
Comment 14 Jonas Danielsson 2015-10-28 16:40:05 UTC
Created attachment 314337 [details] [review]
MainWindow: Add simpler zoom accels

Added zoom accels for plus and minus
Comment 15 Jonas Danielsson 2015-10-28 16:42:11 UTC
Review of attachment 314328 [details] [review]:

Thanks!

The code looks fine, I did however fixup your commit message, please think about that in the feature.
The objective is that it should look good and informative when you go

git log --oneline
Comment 16 amisha 2015-10-28 16:47:35 UTC
Okay.Will keep that in mind from next time. Thanks for review.
Comment 17 Jonas Danielsson 2015-10-28 17:09:23 UTC
Review of attachment 314337 [details] [review]:

pushed
Comment 18 Zeeshan Ali 2015-10-28 18:32:45 UTC
(In reply to Jonas Danielsson from comment #15)
> Review of attachment 314328 [details] [review] [review]:
> 
> Thanks!
> 
> The code looks fine, I did however fixup your commit message, please think
> about that in the feature.
> The objective is that it should look good and informative when you go
> 
> git log --oneline

If you follow this guide, you'll be all set: https://wiki.gnome.org/Git/CommitMessages (Checklist is useful when you're about to send your patches and want to ensure everything is in order).
Comment 19 Zeeshan Ali 2016-03-24 12:57:51 UTC
Seems = and Ctrl+= still don't work. We really should support '=' cause on English layouts you need to press shift+= for '+' key and that's very annoying and hence is probably the reason why other map implementations support '=' for zooming-in.
Comment 20 Razvan Brinzea 2016-04-06 16:07:08 UTC
Created attachment 325492 [details] [review]
Add zoom in accel for equal

I know it's a very simple thing, but I wanted to get some more familiarity with how keyboard shortcuts are handled, I hope it's alright.
Comment 21 Jonas Danielsson 2016-04-19 10:17:31 UTC
Review of attachment 325492 [details] [review]:

::: data/ui/help-overlay.ui
@@ +55,3 @@
                 <property name="visible">1</property>
                 <property name="title" translatable="yes" context="shortcut window">Zoom in</property>
+                <property name="accelerator">plus equal</property>

Is this the right way of doing it? How does evince look for instance? Do we have one row or two?
Comment 22 Razvan Brinzea 2016-04-20 15:12:32 UTC
Created attachment 326426 [details]
Help overlay with equal accel

This is what it looks like. I followed the example of the Show Shortcuts entry and I think it's alright.