[gnome-calendar] year-view: Week numbers shown in big dark squares



commit 8af0e6f84ecb94f2a611e65e3e124bb7b7c377d1
Author: Isaque Galdino <igaldino gmail com>
Date:   Thu Mar 10 15:53:53 2016 -0300

    year-view: Week numbers shown in big dark squares
    
    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

 data/theme/gtk-styles.css |    4 ++--
 src/gcal-year-view.c      |    8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/data/theme/gtk-styles.css b/data/theme/gtk-styles.css
index be07bc8..47412f1 100644
--- a/data/theme/gtk-styles.css
+++ b/data/theme/gtk-styles.css
@@ -107,8 +107,8 @@ calendar-view.second-view-header {
     font-size: 70%;
     font-weight: bold;
     border-radius: 2px;
-    background-color: alpha(@theme_fg_color, 0.55);
-    color: @theme_bg_color;
+    background-color: alpha(@theme_fg_color, 0.05);
+    color: alpha(@theme_fg_color, 0.4);
 }
 
 /* these two are supposed be changed in sync with .calendar-view */
diff --git a/src/gcal-year-view.c b/src/gcal-year-view.c
index 994a2e0..0b7ed9b 100644
--- a/src/gcal-year-view.c
+++ b/src/gcal-year-view.c
@@ -29,7 +29,7 @@
 #define NAVIGATOR_CELL_HEIGHT 210
 #define SIDEBAR_PREFERRED_WIDTH 200
 #define VISUAL_CLUES_SIDE 3.0
-#define WEEK_NUMBER_PADDING 3.0
+#define WEEK_NUMBER_MARGIN 3.0
 
 typedef struct
 {
@@ -848,9 +848,9 @@ draw_month_grid (GcalYearView *year_view,
       box_padding_start = (box_side - layout_width) / 2.0 > 0 ? (box_side - layout_width) / 2.0 : 0;
 
       gtk_render_background (context, cr,
-                             x + sw * WEEK_NUMBER_PADDING + year_view->k * (7 * 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);
+                             x + sw * box_padding_top + year_view->k * (8 * box_side - layout_height) - 
WEEK_NUMBER_MARGIN,
+                             box_side * (i + 1) + y + box_padding_top - WEEK_NUMBER_MARGIN,
+                             layout_height + WEEK_NUMBER_MARGIN * 2, layout_height + WEEK_NUMBER_MARGIN * 2);
 
       gtk_render_layout (context, cr,
                          x + sw * box_padding_start + year_view->k * (8 * box_side - layout_width),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]