week-grid, week-view: improve hour sidebar rendering
The hour strings are too soft and can barely be read. Fix that by setting a stronger color. https://bugzilla.gnome.org/show_bug.cgi?id=777420
This commit is contained in:
@@ -411,11 +411,14 @@ datechooser day:selected:hover {
|
||||
|
||||
.week-view .hours {
|
||||
font-size: 10pt;
|
||||
font-weight: normal;
|
||||
color: alpha(@theme_fg_color, 0.25);
|
||||
color: alpha(@theme_fg_color, 0.8);
|
||||
padding: 8px 12px;
|
||||
}
|
||||
|
||||
.week-view .lines {
|
||||
color: alpha(@theme_fg_color, 0.30);
|
||||
}
|
||||
|
||||
weekgrid.now-strip {
|
||||
background-color: alpha(@theme_selected_bg_color, 0.8);
|
||||
margin: 0 0 0 1px;
|
||||
|
||||
@@ -460,7 +460,7 @@ gcal_week_grid_draw (GtkWidget *widget,
|
||||
ltr = gtk_widget_get_direction (widget) != GTK_TEXT_DIR_RTL;
|
||||
|
||||
gtk_style_context_save (context);
|
||||
gtk_style_context_add_class (context, "hours");
|
||||
gtk_style_context_add_class (context, "lines");
|
||||
gtk_style_context_get_color (context, state, &color);
|
||||
gtk_style_context_get_padding (context, state, &padding);
|
||||
|
||||
|
||||
@@ -414,6 +414,8 @@ gcal_week_view_draw_hours (GcalWeekView *self,
|
||||
state = gtk_widget_get_state_flags (widget);
|
||||
ltr = gtk_widget_get_direction (widget) != GTK_TEXT_DIR_RTL;
|
||||
|
||||
gtk_style_context_save (context);
|
||||
|
||||
gtk_style_context_add_class (context, "hours");
|
||||
gtk_style_context_get_color (context, state, &color);
|
||||
gtk_style_context_get_padding (context, state, &padding);
|
||||
@@ -446,15 +448,22 @@ gcal_week_view_draw_hours (GcalWeekView *self,
|
||||
pango_layout_set_text (layout, hours, -1);
|
||||
pango_layout_get_pixel_size (layout, &font_width, NULL);
|
||||
|
||||
cairo_move_to (cr,
|
||||
ltr ? padding.left : width - font_width - padding.right,
|
||||
(height / 24) * i + padding.top);
|
||||
|
||||
pango_cairo_show_layout (cr, layout);
|
||||
gtk_render_layout (context,
|
||||
cr,
|
||||
ltr ? padding.left : width - font_width - padding.right,
|
||||
(height / 24) * i + padding.top,
|
||||
layout);
|
||||
|
||||
g_free (hours);
|
||||
}
|
||||
|
||||
gtk_style_context_restore (context);
|
||||
|
||||
gtk_style_context_save (context);
|
||||
gtk_style_context_add_class (context, "lines");
|
||||
gtk_style_context_get_color (context, state, &color);
|
||||
|
||||
gdk_cairo_set_source_rgba (cr, &color);
|
||||
cairo_set_line_width (cr, 0.65);
|
||||
|
||||
if (!ltr)
|
||||
@@ -483,6 +492,8 @@ gcal_week_view_draw_hours (GcalWeekView *self,
|
||||
|
||||
cairo_stroke (cr);
|
||||
|
||||
gtk_style_context_restore (context);
|
||||
|
||||
pango_font_description_free (font_desc);
|
||||
g_object_unref (layout);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user