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 642031 - Adapting boxpointer to allow more precise placement of the arrow and match the calendar mockup
Adapting boxpointer to allow more precise placement of the arrow and match th...
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Dan Winship
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-02-10 14:27 UTC by Quentin "Sardem FF7" Glidic
Modified: 2011-02-16 15:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add precision to arrow placement (3.51 KB, patch)
2011-02-10 14:27 UTC, Quentin "Sardem FF7" Glidic
needs-work Details | Review
Try to make the arrow match the mockup (951 bytes, patch)
2011-02-10 14:27 UTC, Quentin "Sardem FF7" Glidic
needs-work Details | Review
Add precision to arrow placement (5.99 KB, patch)
2011-02-16 11:12 UTC, Quentin "Sardem FF7" Glidic
committed Details | Review
Try to make the arrow match the mockup (944 bytes, patch)
2011-02-16 11:13 UTC, Quentin "Sardem FF7" Glidic
committed Details | Review

Description Quentin "Sardem FF7" Glidic 2011-02-10 14:27:13 UTC
Created attachment 180582 [details] [review]
Add precision to arrow placement

On the calendar mockup the arrow is somewhere about 20% of the top border, not at the begin, nor the end.
Comment 1 Quentin "Sardem FF7" Glidic 2011-02-10 14:27:51 UTC
Created attachment 180583 [details] [review]
Try to make the arrow match the mockup
Comment 2 Dan Winship 2011-02-15 19:23:24 UTC
Comment on attachment 180582 [details] [review]
Add precision to arrow placement

>+  ST_ALIGN_START = 0,
>+  ST_ALIGN_MIDDLE = 50,
>+  ST_ALIGN_END = 100

You should not do this. If we need precise alignment, then change the API to not take an StAlign value, and pass a float (not an integer).

However, I am not sure that this really matters. I think the calendar would probably look fine with St.Align.MIDDLE. (It also seems to me that it's probably at 25% in the mockup; that is, it's centered over the the left half of the UI. I wonder, however, if this is just a remnant of an earlier design, in which the right half of the UI either didn't exist, or else could be shown and hidden.)

(And as a random aside, part of the ugliness of the current state seems to be because the earlier arrow-drawing patches lost the constraint of "don't draw the arrow closer than 2*borderRadius from the edge if possible".)
Comment 3 Dan Winship 2011-02-15 19:24:24 UTC
Jon/Jakub: where exactly is the calendar supposed to float, relative to its panel button?
Comment 4 Owen Taylor 2011-02-15 19:27:24 UTC
(In reply to comment #3)
> Jon/Jakub: where exactly is the calendar supposed to float, relative to its
> panel button?

On IRC the other day, Jon said the left column is supposed to be centered under the date. (so, sort of like the old calendar, but with the second column added to the right)
Comment 5 Dan Winship 2011-02-15 20:05:59 UTC
Comment on attachment 180582 [details] [review]
Add precision to arrow placement

ok, so setPosition() should take a float, rather than an St.Align.

and you should make sure the 0.0 and 1.0 positions are correct (starting at 2*borderRadius from the edge)
Comment 6 Dan Winship 2011-02-15 20:06:32 UTC
Comment on attachment 180583 [details] [review]
Try to make the arrow match the mockup

>+        PanelMenu.Button.prototype._init.call(this, 20);

should be 0.25
Comment 7 Quentin "Sardem FF7" Glidic 2011-02-16 11:12:45 UTC
Created attachment 180979 [details] [review]
Add precision to arrow placement

I think it's that
Comment 8 Quentin "Sardem FF7" Glidic 2011-02-16 11:13:30 UTC
Created attachment 180980 [details] [review]
Try to make the arrow match the mockup

I don't think 0.25 is the right amount but …
Comment 9 Dan Winship 2011-02-16 15:20:26 UTC
25% looks right to me