[gnome-calendar/wip/pandusonu/week-view: 42/60] week-header: reorganize widgets



commit 2298379e51280dbdd46e4b228da25b47dd5eb1de
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Wed Nov 2 15:17:50 2016 -0200

    week-header: reorganize widgets
    
    Instead of a box inside the overlay, put the overlay inside the
    box.

 data/ui/week-header.ui |  280 ++++++++++++++++++++++++------------------------
 1 files changed, 142 insertions(+), 138 deletions(-)
---
diff --git a/data/ui/week-header.ui b/data/ui/week-header.ui
index 6154d3d..cb36551 100644
--- a/data/ui/week-header.ui
+++ b/data/ui/week-header.ui
@@ -7,40 +7,74 @@
       <class name="week-header" />
     </style>
     <child>
-      <object class="GtkGrid">
+      <object class="GtkBox">
         <property name="visible">True</property>
-        <property name="orientation">vertical</property>
+        <property name="orientation">horizontal</property>
         <child>
-          <object class="GtkGrid">
+          <object class="GtkLabel" id="month_label">
             <property name="visible">True</property>
-            <property name="orientation">horizontal</property>
-            <child>
-              <object class="GtkLabel" id="month_label">
-                <property name="visible">True</property>
-                <property name="label">Month</property>
-                <style>
-                  <class name="month-name" />
-                </style>
-              </object>
-            </child>
+            <property name="label">Month</property>
+            <style>
+              <class name="month-name" />
+            </style>
+          </object>
+        </child>
+        <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="week-number" />
+            </style>
+          </object>
+        </child>
+        <child>
+          <object class="GtkLabel" id="year_label">
+            <property name="visible">True</property>
+            <property name="label">Year</property>
+            <style>
+              <class name="week-number" />
+            </style>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="left_attach">0</property>
+        <property name="top_attach">0</property>
+        <property name="width">1</property>
+        <property name="height">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="orientation">horizontal</property>
+        <child>
+          <object class="GtkBox" id="expand_button_box">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="hexpand">False</property>
             <child>
-              <object class="GtkLabel" id="week_label">
+              <object class="GtkButton" id="expand_button">
                 <property name="visible">True</property>
+                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
-                <property name="xalign">0</property>
-                <property name="label">Week</property>
+                <property name="halign">center</property>
+                <property name="valign">end</property>
+                <property name="margin-bottom">6</property>
+                <signal name="clicked" handler="on_expand_action_activated" object="GcalWeekHeader" 
swapped="yes"/>
                 <style>
-                  <class name="week-number" />
-                </style>
-              </object>
-            </child>
-            <child>
-              <object class="GtkLabel" id="year_label">
-                <property name="visible">True</property>
-                <property name="label">Year</property>
-                <style>
-                  <class name="week-number" />
+                  <class name="flat" />
+                  <class name="circular" />
                 </style>
+                <child>
+                  <object class="GtkImage" id="expand_button_image">
+                    <property name="visible">True</property>
+                    <property name="icon_name">go-down-symbolic</property>
+                  </object>
+                </child>
               </object>
             </child>
           </object>
@@ -59,131 +93,97 @@
               </object>
             </child>
             <child type="overlay">
-              <object class="GtkBox">
+              <object class="GtkScrolledWindow" id="scrolledwindow">
                 <property name="visible">True</property>
-                <property name="orientation">horizontal</property>
+                <property name="max-content-height">150</property>
                 <child>
-                  <object class="GtkBox" id="expand_button_box">
+                  <object class="GtkViewport">
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="hexpand">False</property>
+                    <property name="shadow_type">none</property>
                     <child>
-                      <object class="GtkButton" id="expand_button">
+                      <object class="GtkGrid" id="grid">
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
+                        <property name="column-homogeneous">True</property>
                         <property name="hexpand">True</property>
-                        <property name="halign">center</property>
-                        <property name="valign">end</property>
-                        <property name="margin-bottom">6</property>
-                        <signal name="clicked" handler="on_expand_action_activated" object="GcalWeekHeader" 
swapped="yes"/>
-                        <style>
-                          <class name="flat" />
-                          <class name="circular" />
-                        </style>
+                        <property name="column-spacing">8</property>
+                        <property name="row-spacing">2</property>
+                        <property name="margin-start">6</property>
                         <child>
-                          <object class="GtkImage" id="expand_button_image">
+                          <object class="GtkBox">
                             <property name="visible">True</property>
-                            <property name="icon_name">go-down-symbolic</property>
                           </object>
+                          <packing>
+                            <property name="left_attach">0</property>
+                            <property name="top_attach">0</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkBox">
+                            <property name="visible">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="top_attach">0</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkBox">
+                            <property name="visible">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">2</property>
+                            <property name="top_attach">0</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkBox">
+                            <property name="visible">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">3</property>
+                            <property name="top_attach">0</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkBox">
+                            <property name="visible">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">4</property>
+                            <property name="top_attach">0</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkBox">
+                            <property name="visible">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">5</property>
+                            <property name="top_attach">0</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
                         </child>
-                      </object>
-                    </child>
-                  </object>
-                </child>
-                <child>
-                  <object class="GtkScrolledWindow" id="scrolledwindow">
-                    <property name="visible">True</property>
-                    <property name="max-content-height">150</property>
-                    <child>
-                      <object class="GtkViewport">
-                        <property name="visible">True</property>
-                        <property name="shadow_type">none</property>
                         <child>
-                          <object class="GtkGrid" id="grid">
+                          <object class="GtkBox">
                             <property name="visible">True</property>
-                            <property name="column-homogeneous">True</property>
-                            <property name="hexpand">True</property>
-                            <property name="column-spacing">8</property>
-                            <property name="row-spacing">2</property>
-                            <signal name="size-allocate" handler="fix_background_size_request" 
object="GcalWeekHeader" swapped="yes" />
-                            <child>
-                              <object class="GtkBox">
-                                <property name="visible">True</property>
-                              </object>
-                              <packing>
-                                <property name="left_attach">0</property>
-                                <property name="top_attach">0</property>
-                                <property name="width">1</property>
-                                <property name="height">1</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkBox">
-                                <property name="visible">True</property>
-                              </object>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="top_attach">0</property>
-                                <property name="width">1</property>
-                                <property name="height">1</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkBox">
-                                <property name="visible">True</property>
-                              </object>
-                              <packing>
-                                <property name="left_attach">2</property>
-                                <property name="top_attach">0</property>
-                                <property name="width">1</property>
-                                <property name="height">1</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkBox">
-                                <property name="visible">True</property>
-                              </object>
-                              <packing>
-                                <property name="left_attach">3</property>
-                                <property name="top_attach">0</property>
-                                <property name="width">1</property>
-                                <property name="height">1</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkBox">
-                                <property name="visible">True</property>
-                              </object>
-                              <packing>
-                                <property name="left_attach">4</property>
-                                <property name="top_attach">0</property>
-                                <property name="width">1</property>
-                                <property name="height">1</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkBox">
-                                <property name="visible">True</property>
-                              </object>
-                              <packing>
-                                <property name="left_attach">5</property>
-                                <property name="top_attach">0</property>
-                                <property name="width">1</property>
-                                <property name="height">1</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkBox">
-                                <property name="visible">True</property>
-                              </object>
-                              <packing>
-                                <property name="left_attach">6</property>
-                                <property name="top_attach">0</property>
-                                <property name="width">1</property>
-                                <property name="height">1</property>
-                              </packing>
-                            </child>
                           </object>
+                          <packing>
+                            <property name="left_attach">6</property>
+                            <property name="top_attach">0</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
                         </child>
                       </object>
                     </child>
@@ -194,6 +194,10 @@
           </object>
         </child>
       </object>
+      <packing>
+        <property name="left_attach">0</property>
+        <property name="top_attach">1</property>
+      </packing>
     </child>
   </template>
   <object class="GtkSizeGroup" id="sizegroup">


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