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 759354 - Week numbers difficult to read
Week numbers difficult to read
Status: RESOLVED FIXED
Product: gnome-calendar
Classification: Applications
Component: Views
3.18.x
Other Linux
: Normal normal
: 3.26
Assigned To: GNOME Calendar maintainers
GNOME Calendar maintainers
Depends on:
Blocks:
 
 
Reported: 2015-12-11 14:31 UTC by Sebastien Bacher
Modified: 2017-04-17 18:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A few options (15.15 KB, image/png)
2016-01-13 04:13 UTC, Isaque Galdino
  Details
gnome shell week # styling (112.40 KB, image/png)
2016-02-01 16:20 UTC, Jakub Steiner
  Details
year-view: Changed week numbers style (2.78 KB, patch)
2016-02-03 02:43 UTC, Isaque Galdino
none Details | Review
blurred squares (46.36 KB, image/png)
2016-02-10 13:34 UTC, Georges Basile Stavracas Neto
  Details
year-view: Changed week numbers style (2.89 KB, patch)
2016-02-11 01:20 UTC, Isaque Galdino
needs-work Details | Review
year-view: Change week numbers style (2.89 KB, patch)
2016-02-19 22:21 UTC, Isaque Galdino
committed Details | Review

Description Sebastien Bacher 2015-12-11 14:31:38 UTC
Using 3.18, I find the week numbers almost impossible to read.

See e.g the screenshot of the website
https://wiki.gnome.org/Apps/Calendar/Features?action=AttachFile&do=get&target=views.png

the numbers on the left can be guessed if you really look closely but they are not really easily readable...
Comment 1 Ilie Nicolae Vlad 2015-12-22 22:39:58 UTC
What should i modify?
Comment 2 Georges Basile Stavracas Neto 2015-12-22 23:37:21 UTC
To fix it, we want 2 things:
- Make the week numbers slightly bigger (but still smaller than the normal)
- Make the week numbers slightly darker (or lighter, when in dark mode)
Comment 3 Isaque Galdino 2016-01-13 04:13:01 UTC
Created attachment 318933 [details]
A few options

Here are a few options to change it.
Please let me know which (if any) of these options will be fine.
Thanks.
Comment 4 Jakub Steiner 2016-01-13 12:32:25 UTC
I would argue having week numbers is not a good default. If you make them legible, they interfere with the day view. If you make them subtle, people complain they aren't legible. 

I would follow the shell behavior of not using week numbering by default. If somebody really really needs them and enables them in the tweak tool, they should be visible prominently, such as:

http://jimmac.musichall.cz/stuff/week-numbers.png

I agree they are barely legible now. I would get rid of them :)
Comment 5 Lapo Calamandrei 2016-01-14 11:29:07 UTC
I'm with jakub, this should probably be an option (I'd put them in a circle rather than a weirdly shaped rounded rectangle tho :-))
Comment 6 Jakub Steiner 2016-01-14 14:42:23 UTC
(In reply to Lapo Calamandrei from comment #5)
> I'm with jakub, this should probably be an option (I'd put them in a circle
> rather than a weirdly shaped rounded rectangle tho :-))

The reason for the special shape is that days with events and today are rounded pills (in the shell widget at least).
Comment 7 Isaque Galdino 2016-01-14 16:11:38 UTC
This is what I got so far:

https://www.dropbox.com/s/ez9qrgrrwis2rcq/Captura%20de%20tela%20de%202016-01-14%2013-35-20.png?dl=0

and with RTL text direction (this was a tougth one):
https://www.dropbox.com/s/0yjpfswyhjrkko7/Captura%20de%20tela%20de%202016-01-14%2014-06-22.png?dl=0

Let me know if the colors and font sizes are ok. I'll work on shapes and others later.
Comment 8 Lapo Calamandrei 2016-01-14 19:34:51 UTC
On #gnome-design you showed a screenshot with blue numbers, imho that's pretty good, being the month name kind of an "index" having the other index being the same color logically works for me and it has pretty good readability, which is what this bug is about. Jakub?
Comment 9 Isaque Galdino 2016-01-15 00:02:26 UTC
This is the latest change:

https://www.dropbox.com/s/51j7thj1lyf32nc/Captura%20de%20tela%20de%202016-01-14%2021-58-48.png?dl=0

Lapo, I moved it 2 pixels away as you requested. Please let me know if that is OK.
Comment 10 Lapo Calamandrei 2016-01-15 14:29:45 UTC
Looks pretty good to me, I'd like Jakub take on this as well
Comment 11 Jakub Steiner 2016-01-28 14:46:37 UTC
I wouldn't mix very similar style of the day numbers and the week numbers. Even if I did, I'd want them to baseline aligned. 

There are a couple of things Lapo doesn't like about the shell styling. The non uniform border-radius I'm fine with dropping for a uniform 3px. The low legibility can be addressed by making the tile a bit lighter (darker for Calendar app).

I'll attach a screenshot of the shell when I land those changes.
Comment 12 Erick Perez Castellanos 2016-01-29 14:41:28 UTC
(In reply to igaldino from comment #9)
> This is the latest change:
> 
> https://www.dropbox.com/s/51j7thj1lyf32nc/Captura%20de%20tela%20de%202016-01-
> 14%2021-58-48.png?dl=0
> 
> Lapo, I moved it 2 pixels away as you requested. Please let me know if that
> is OK.

So, great, where's the patch so we can applied and be done with this?
Comment 13 Isaque Galdino 2016-01-29 15:18:19 UTC
(In reply to Erick Perez Castellanos from comment #12)
> So, great, where's the patch so we can applied and be done with this?

Lapo and Jakub are changing the gnome-shell calendar panel style and we'll use the same style in year-view. So, I'm waiting for them.
Comment 14 Jakub Steiner 2016-02-01 16:20:54 UTC
Created attachment 320194 [details]
gnome shell week # styling

This is what shell master looks now - week # is a rounded rectangle with baseline aligned number.
Comment 15 Isaque Galdino 2016-02-03 02:43:45 UTC
Created attachment 320303 [details] [review]
year-view: Changed week numbers style

Week numbers in year view was using a small and very light style and
that was making difficult for users to be able to read it.

After a few conversation with gnome-design team, they proposed the best
approach it would be to use the same style as gnome-shell panel does.

The week numbers style was changed to be as close as possible to the
gnome-shell panel.
Comment 16 Georges Basile Stavracas Neto 2016-02-09 20:39:36 UTC
Review of attachment 320303 [details] [review]:

The patch looks mostly good, but I notice the rounded rectangles are blurry (at least in my screen). This is usually fixed by adding +0.5 to (x, y) coordinates of gtk_render_background().

::: data/theme/gtk-styles.css
@@ +108,3 @@
+    font-weight: bold;
+    border-radius: 2px;
+    background-color: alpha(@theme_fg_color, 0.7);

Maybe a slightly less dark background... 0.55 looks better IMHO.

::: src/gcal-year-view.c
@@ +790,3 @@
       pango_layout_get_pixel_size (layout, &layout_width, &layout_height);
       box_padding_top = (box_side - layout_height) / 2 > 0 ? (box_side - layout_height) / 2 : 0;
+      box_padding_start = (box_side - layout_width) / 2 > 0 ? (box_side - layout_width) / 2 : 0;

Use 2.0 instead of 2 to return a double instead of an int.
Comment 17 Isaque Galdino 2016-02-10 13:12:48 UTC
(In reply to Georges Basile Stavracas Neto from comment #16)
> The patch looks mostly good, but I notice the rounded rectangles are blurry
> (at least in my screen). This is usually fixed by adding +0.5 to (x, y)
> coordinates of gtk_render_background().

Can you please share a screenshot? I can't see the issue @ my rig (1366x768)

> +    background-color: alpha(@theme_fg_color, 0.7);
> 
> Maybe a slightly less dark background... 0.55 looks better IMHO.

I based this on gnome-shell style. If we make it lighter won't we move away from the idea of being more like the gnome-shell style?

> +      box_padding_start = (box_side - layout_width) / 2 > 0 ? (box_side -
> layout_width) / 2 : 0;
> 
> Use 2.0 instead of 2 to return a double instead of an int.

All other box_padding_top and box_padding_start calculation uses 2 instead of 2.0, so should I change all other as well?
Comment 18 Georges Basile Stavracas Neto 2016-02-10 13:33:39 UTC
(In reply to igaldino from comment #17) 
> Can you please share a screenshot? I can't see the issue @ my rig (1366x768)

Sure.

> I based this on gnome-shell style. If we make it lighter won't we move away
> from the idea of being more like the gnome-shell style?

 The Shell theme is build on top of a dark background. Here we should make it work both on the dark and light variants of Adwaita (and possibly other themes).
 
> All other box_padding_top and box_padding_start calculation uses 2 instead
> of 2.0, so should I change all other as well?

Yes, in a sepparate patch.
Comment 19 Georges Basile Stavracas Neto 2016-02-10 13:34:54 UTC
Created attachment 320799 [details]
blurred squares

The squares as they appear on my end.

Notice that the top squares are somewhat blurred, while the bottom ones are more precisely drawn.
Comment 20 Isaque Galdino 2016-02-11 01:20:11 UTC
Created attachment 320839 [details] [review]
year-view: Changed week numbers style

Week numbers in year view was using a small and very light style and
that was making difficult for users to be able to read it.

After a few conversation with gnome-design team, they proposed the best
approach it would be to use the same style as gnome-shell panel does.

The week numbers style was changed to be as close as possible to the
gnome-shell panel.
Comment 21 Isaque Galdino 2016-02-19 22:21:51 UTC
Created attachment 321700 [details] [review]
year-view: Change week numbers style

Week numbers in year view was using a small and very light style and
that was making difficult for users to be able to read it.

After a few conversation with gnome-design team, they proposed the best
approach it would be to use the same style as gnome-shell panel does.

The week numbers style was changed to be as close as possible to the
gnome-shell panel.
Comment 22 Isaque Galdino 2016-02-19 22:24:13 UTC
Review of attachment 320839 [details] [review]:

I'm not sure why this was not canceled when I entered a new one.
Comment 23 Georges Basile Stavracas Neto 2016-02-22 03:18:16 UTC
Attachment 321700 [details] pushed as 1e2a0d1 - year-view: Change week numbers style
Comment 24 Georges Basile Stavracas Neto 2016-02-22 03:19:08 UTC
Thanks for working on it.