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 725851 - Improve the zoom control
Improve the zoom control
Status: RESOLVED FIXED
Product: gnome-maps
Classification: Applications
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-maps-maint
gnome-maps-maint
: 706296 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-03-06 21:16 UTC by Jonas Danielsson
Modified: 2014-10-10 18:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
improve the zoom-control (1.56 KB, patch)
2014-10-03 10:28 UTC, amisha
needs-work Details | Review
improve the zoom-control (5.59 KB, patch)
2014-10-03 17:14 UTC, amisha
needs-work Details | Review
improve the zoom-control (7.84 KB, patch)
2014-10-09 17:48 UTC, amisha
needs-work Details | Review
using only space for indentation (2.65 KB, patch)
2014-10-10 06:25 UTC, amisha
needs-work Details | Review
Use space for indentation (2.52 KB, patch)
2014-10-10 06:59 UTC, amisha
committed Details | Review
improve the zoom-control (7.84 KB, patch)
2014-10-10 07:04 UTC, amisha
none Details | Review
improve the zoom-control (8.60 KB, patch)
2014-10-10 07:08 UTC, amisha
none Details | Review
improve the zoom-control (8.02 KB, patch)
2014-10-10 13:34 UTC, amisha
none Details | Review

Description Jonas Danielsson 2014-03-06 21:16:31 UTC
The zoom-control we have now was created with transparency in mind. Since we are not able to have transparency over a Clutter surface we might want to rethink it.

Also at the moment it does not have a "pressed" state and does not behave much as buttons.

A new design and a improved implementation might be in order.
Comment 1 Mattias Bengtsson 2014-03-07 08:58:01 UTC
I think it makes sense to just move the zoom control back to the clutter canvas again actually. We still want the overlay for popovers and everything, but markers, location-bubbles and the zoom control probably can live in the mapview. 

What do you think?
Comment 2 Jonas Danielsson 2014-03-17 12:09:07 UTC
*** Bug 706296 has been marked as a duplicate of this bug. ***
Comment 3 Jonas Danielsson 2014-06-13 09:24:20 UTC
I'm not sure that transparency for the zoom control is needed or even pretty.
I would like a nice zoom control for 3.14.

Mockups requested!
Comment 4 amisha 2014-10-03 10:28:46 UTC
Created attachment 287655 [details] [review]
improve the zoom-control
Comment 5 Jonas Danielsson 2014-10-03 10:42:56 UTC
Review of attachment 287655 [details] [review]:

Hi!

Thanks for the patch!

I think that if we are going the route of using standard buttons with the "linked" class then we do not want any css or images.
So I think you should remove all css that applies to these buttons and all the images as well. And instead set the label of the buttons to +/-. Maybe even the unicode ones?

Please also remove the image files and the reference to them in all resource files and make files.
Comment 6 amisha 2014-10-03 17:14:38 UTC
Created attachment 287691 [details] [review]
improve the zoom-control
Comment 7 Jonas Danielsson 2014-10-03 20:28:29 UTC
Review of attachment 287691 [details] [review]:

Thanks!

You removed the images, great! But you forgot to remove them from src/gnome-maps.data.gresource.xml, this gave me a build-error.
Please remove them from there in the next revision.

I think this can be pretty. But it needs some more work. I think the +/- signs need to be bigger. And possibly bold.
And the buttons look kind of bloated to me. Maybe you can remove the width/height requests? And see if you can make the buttons look good.

Also when you are in the ui file, could you convert it to using spaces only as indentation?

Thanks!
Comment 8 amisha 2014-10-04 13:12:48 UTC
screen shot of changed zoom control

http://ctrlv.in/443999
Comment 9 Andreas Nilsson 2014-10-04 14:51:42 UTC
I agree that the buttons look very fat. I would suggest making them equally high as wide. There is also some fuzzy antialias going on around the borders. Might need to make sure it matches the pixel grid by being positioned properly.
Comment 10 Mattias Bengtsson 2014-10-05 21:56:56 UTC
Yeah, I'd say make the buttons as big as the headerbar buttons (style class "imagebutton"), and make them be horizontally aligned with the leftmost button of the headerbar.
Comment 11 Jonas Danielsson 2014-10-06 07:13:17 UTC
You might need to play with the halign/valign properties of the GtkButton, and also maybe the packing properties, to sett "fill" to false.

Try going ctrl-shift-i when maps is open, you will get the GtkInspector and can inspect the different properties and child properties of the widgets. And see what happens when you change them.

http://blogs.gnome.org/mclasen/2014/05/15/introducing-gtkinspector/
Comment 12 amisha 2014-10-07 14:33:42 UTC
screenshot of improved zoom control with height and width of zoom in and zoom out button same as that of headerbar buttons (34 X 34)

http://ctrlv.in/445292
Comment 13 Jonas Danielsson 2014-10-07 18:22:23 UTC
Looks nice!

Maybe it also should be aligned with the button in the header bar?
The placement of the zoom control is controlled by the values in zoomControl.js, the halign/valing sent to this.parent.

Please post the patch as well next time?
Comment 14 Jonas Danielsson 2014-10-07 18:24:59 UTC
Sorry, I mean the margin_top and the margin_start.
Comment 15 Andreas Nilsson 2014-10-07 18:55:39 UTC
(In reply to comment #12)
> screenshot of improved zoom control with height and width of zoom in and zoom
> out button same as that of headerbar buttons (34 X 34)
> 
> http://ctrlv.in/445292

That looks a lot better. Thanks!
Comment 16 amisha 2014-10-09 17:48:00 UTC
Created attachment 288157 [details] [review]
improve the zoom-control
Comment 17 Jonas Danielsson 2014-10-10 05:12:48 UTC
Review of attachment 288157 [details] [review]:

Thanks!

It looks nice! Have some comments and questions below. Also, could you also do a patch that converts the zoom-control.ui to just use spaces for indentation?
And have that patch come before this one?

::: src/zoom-control.ui
@@ +21,3 @@
+			<property name="can_focus">False</property>
+			<property name="margin">0</property>
+			<property name="label" translatable="yes">_+</property>

This does not need to be translatable.

Why does this have an underscore before the '+'?

@@ +22,3 @@
+			<property name="margin">0</property>
+			<property name="label" translatable="yes">_+</property>
+			<property name="use_underline">True</property>

Why to we need to use underline?

@@ +39,3 @@
+			<property name="can_focus">False</property>
+			<property name="margin">0</property>
+			<property name="label" translatable="yes">_-</property>

This does not need to be translatab.e

::: src/zoomControl.js
@@ +32,3 @@
         this.parent({ halign: Gtk.Align.START,
                       valign: Gtk.Align.START,
                       margin_top: 20,

I think I might prefer 6 on both of these, Andreas?
Comment 18 amisha 2014-10-10 06:25:28 UTC
Created attachment 288185 [details] [review]
using only space for indentation
Comment 19 Jonas Danielsson 2014-10-10 06:50:25 UTC
Review of attachment 288185 [details] [review]:

Thanks! Awesome.

So the topic of this will be the commit shortlog. I think we can do better!
How about: "zoom-control: Use space for indentation" ?

Also, could you change the indentation to use two spaces only? Like the other ui files?
Comment 20 amisha 2014-10-10 06:59:11 UTC
Created attachment 288186 [details] [review]
Use space for indentation
Comment 21 Jonas Danielsson 2014-10-10 07:03:33 UTC
Review of attachment 288186 [details] [review]:

Awesome!
Comment 22 amisha 2014-10-10 07:04:29 UTC
Created attachment 288187 [details] [review]
improve the zoom-control
Comment 23 amisha 2014-10-10 07:08:20 UTC
Created attachment 288188 [details] [review]
improve the zoom-control
Comment 24 Jonas Danielsson 2014-10-10 07:13:34 UTC
This doesn't really apply for me, is there some kind of rebase mishap?
Comment 25 amisha 2014-10-10 13:34:55 UTC
Created attachment 288222 [details] [review]
improve the zoom-control
Comment 26 Jonas Danielsson 2014-10-10 18:05:11 UTC
committed with modifications @288222 - improve the zoom-control - none
Comment 27 amisha 2014-10-10 18:19:18 UTC
Is the patch getting applied now?