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. https://bugzilla.gnome.org/show_bug.cgi?id=759354
This commit is contained in:
committed by
Georges Basile Stavracas Neto
parent
e067e8cf73
commit
1e2a0d1a3d
@@ -104,8 +104,11 @@ calendar-view.second-view-header {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.year-navigator.week-numbers {
|
.year-navigator.week-numbers {
|
||||||
color: alpha(@theme_fg_color, 0.2);
|
font-size: 70%;
|
||||||
font: 6;
|
font-weight: bold;
|
||||||
|
border-radius: 2px;
|
||||||
|
background-color: alpha(@theme_fg_color, 0.55);
|
||||||
|
color: @theme_bg_color;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* these two are supposed be changed in sync with .calendar-view */
|
/* these two are supposed be changed in sync with .calendar-view */
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
#define NAVIGATOR_CELL_HEIGHT 210
|
#define NAVIGATOR_CELL_HEIGHT 210
|
||||||
#define SIDEBAR_PREFERRED_WIDTH 200
|
#define SIDEBAR_PREFERRED_WIDTH 200
|
||||||
#define VISUAL_CLUES_SIDE 3.0
|
#define VISUAL_CLUES_SIDE 3.0
|
||||||
|
#define WEEK_NUMBER_PADDING 3.0
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@@ -843,11 +844,16 @@ draw_month_grid (GcalYearView *year_view,
|
|||||||
|
|
||||||
pango_layout_set_text (layout, nr_week, -1);
|
pango_layout_set_text (layout, nr_week, -1);
|
||||||
pango_layout_get_pixel_size (layout, &layout_width, &layout_height);
|
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_top = (box_side - layout_height) / 2.0 > 0 ? (box_side - layout_height) / 2.0 : 0;
|
||||||
box_padding_start = ((box_side / 2) - layout_width) / 2 > 0 ? ((box_side / 2) - layout_width) / 2 : 0;
|
box_padding_start = (box_side - layout_width) / 2.0 > 0 ? (box_side - layout_width) / 2.0 : 0;
|
||||||
|
|
||||||
|
gtk_render_background (context, cr,
|
||||||
|
box_side * (- 0.5) + x + sw * WEEK_NUMBER_PADDING + year_view->k * (8 * box_side + WEEK_NUMBER_PADDING * 2),
|
||||||
|
box_side * (i + 1) + y + WEEK_NUMBER_PADDING,
|
||||||
|
box_side - WEEK_NUMBER_PADDING * 2, box_side - WEEK_NUMBER_PADDING * 2);
|
||||||
|
|
||||||
gtk_render_layout (context, cr,
|
gtk_render_layout (context, cr,
|
||||||
x + sw * box_padding_start + year_view->k * (8 * box_side - layout_width),
|
box_side * (- 0.5) + x + sw * box_padding_start + year_view->k * (9 * box_side - layout_width),
|
||||||
box_side * (i + 1) + y + box_padding_top,
|
box_side * (i + 1) + y + box_padding_top,
|
||||||
layout);
|
layout);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user