week-header: modify the draw() to match mockup

Made changes in the draw() to match the mockups.
This commit is contained in:
pandusonu2
2016-12-01 23:48:53 -02:00
committed by Georges Basile Stavracas Neto
parent 9ff7d79d7d
commit 1122b24216
4 changed files with 130 additions and 35 deletions
+2 -2
View File
@@ -52,14 +52,14 @@ calendar-view.lines {
color: alpha(@theme_fg_color, 0.4);
}
calendar-view.first-view-header {
calendar-view .first-view-header {
font-size: 16pt;
font-weight: bold;
color: @theme_selected_bg_color;
padding: 12px;
}
calendar-view.second-view-header {
calendar-view .second-view-header {
font-size: 16pt;
font-weight: bold;
padding: 12px;
+51 -7
View File
@@ -2,23 +2,67 @@
<interface>
<template class="GcalWeekHeader" parent="GtkScrolledWindow">
<property name="visible">True</property>
<property name="shadow_type">out</property>
<property name="hexpand">True</property>
<property name="max-content-height">200</property>
<child>
<object class="GtkViewport">
<object class="GtkGrid">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkOverlay">
<object class="GtkGrid">
<property name="visible">True</property>
<property name="orientation">horizontal</property>
<child>
<object class="GtkDrawingArea">
<object class="GtkLabel" id="month_label">
<property name="visible">True</property>
<signal name="draw" handler="gcal_week_header_draw" object="GcalWeekHeader" swapped="yes"/>
<property name="label">Month</property>
<style>
<class name="first-view-header" />
</style>
</object>
</child>
<child type="overlay">
<object class="GtkGrid" id="grid">
<child>
<object class="GtkLabel" id="week_label">
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="label">Week</property>
<style>
<class name="second-view-header" />
</style>
</object>
</child>
<child>
<object class="GtkLabel" id="year_label">
<property name="visible">True</property>
<property name="label">Year</property>
<style>
<class name="second-view-header" />
</style>
</object>
</child>
</object>
</child>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkOverlay">
<property name="visible">True</property>
<child>
<object class="GtkDrawingArea" id="draw_area">
<property name="visible">True</property>
<property name="height-request">100</property>
<signal name="draw" handler="gcal_week_header_draw" object="GcalWeekHeader" swapped="yes"/>
</object>
</child>
<child type="overlay">
<object class="GtkGrid" id="grid">
<property name="visible">True</property>
<property name="height-request">100</property>
</object>
</child>
</object>
</child>
</object>
+1 -1
View File
@@ -6,7 +6,7 @@
<child>
<object class="GcalWeekHeader" id="header">
<property name="visible">True</property>
<property name="active-date" bind-source="GcalWeekView" bind-property="active-date" bind-flags="default|sync-create" />
<property name="active-date" bind-source="GcalWeekView" bind-property="active-date" bind-flags="default" />
</object>
</child>
<child>