The current GcalEventWidget implementation is a direct
GtkWidget subclass, which means we have to take care of
all the implementation details such as raising GdkWindows
and managing the drawing all by ourselves.
The event widget, however, can be easily described through
a GtkBuilder file. This would simplify the implementation
and makes us maintain less code.
Fix that by making GcalEventWidget a GtkBin subclass.
Currently, on the year view, Saturday and Sunday are marked
as non working days by default, despite the Locale settings and the
fact that in some Countries Sunday and/or Saturday are workdays.
This patch introduces a new function "is_workday" to check
whether a day is a working day according to the territory part of
Locale.
https://bugzilla.gnome.org/show_bug.cgi?id=746927
It should be very clear that days outside the current
month are actually not valid. The current drawing
algorithm does not differentiate that, thought, and
draws everything at the same color.
Fix that by greying out the days outside the current
month.
https://bugzilla.gnome.org/show_bug.cgi?id=763771
The Week view exposed a bug where we had different
CSS selectors for the exact same label. This made
them look inconsistent, with different colors and
paddings.
Fix that by ensuring they all use the same style
class. The Year view drawing code needed to be
reworked a little.
https://bugzilla.gnome.org/show_bug.cgi?id=778391
By moving the drawing area to a separate place, we're
able to avoid having to manually calculate the sidebar
width.
Also, because we can, the drawing code was simplified a
little bit by moving the bottom border to CSS.
In this commit, we changed the background area of current day.
Presently, the current day is highlighted by the number. This makes difficult for the user to identify it when there are lot of events.
To fix this, we changed the color of background and made background area equal to the cell's area.
https://bugzilla.gnome.org/show_bug.cgi?id=755946
This is mainly a copy-paste from an old branch authored
by Matthias Clasen. The code style was updated to match
Calendar's one, and the theming was improved a little bit.
When dragging an event, it is very important to have
a visual feedback of the possible target areas.
As such, add a gtk_render_background() call to render
the drag cell's background.
The current implementation of the Year navigator gives
absolutely no clue that the days are actually selectable,
which may confuse some users.
A simple way to inform the user that the Year navigator
is actually interactive is the hovering effect.
Fix the lack of feedback by adding the hover effect to the
year navigator.
https://bugzilla.gnome.org/show_bug.cgi?id=762462
Improve year-view code, removing hardcoded values.
year-view have hardcoded values for grid cell sizes (width and height).
Those values need to be recalculated every time a change in font or any
other style are changed.
Sidebar width was also hardcoded instead of getting its value directly
from the ui file. That would prevent it from drawing the content
accordingly when ui file is changed.
This patch fixes those two issues by retrieving those values from CSS or
ui files.
This patch also adds code to resize and redraw the window when
show-week-numbers property is changed.
Popover mode was also changed and now sidebar will always be shown when
show-week-numbers is set or when there is space for only 3 or less
columns.
https://bugzilla.gnome.org/show_bug.cgi?id=753533
The default class for content viewers in Gtk+ is .view and
ideally provided by the theme. Not only that, but it provides
the exact same functionality of ours, but in a way that is
overridable for theme designers.
Fix this issue by removing the class from out CSS.
https://bugzilla.gnome.org/show_bug.cgi?id=765664
Design team testing with GNOME continuous, complained about week numbers
being shown in big dark squares. According to them, these wreck the
layout of the view.
Design team listed the issues, comparing to gnome-shell calendar as:
* The containing boxes are larger in Calendar.
* The background of the boxes has more contrast with the background (it
should be a lot lighter in Calendar).
* Week numbers are an option in the shell, and are off by default.
This patches fixes the two first items: week numbers box' size and
color. Option to set on/off week numbers will be implemented in a future
patch.
https://bugzilla.gnome.org/show_bug.cgi?id=763251
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.
https://bugzilla.gnome.org/show_bug.cgi?id=759354