year-view: Remove hardcoded values

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
This commit is contained in:
Isaque Galdino
2016-05-16 12:03:39 -03:00
committed by Georges Basile Stavracas Neto
parent 32a3a8f530
commit 97d8859574
3 changed files with 181 additions and 69 deletions
+1
View File
@@ -89,6 +89,7 @@ calendar-view.second-view-header {
}
.year-navigator.days {
padding: 5px;
color: @theme_fg_color;
font: 9;
}