[gnome-todo] new-task-row: make entry cover the whole row



commit bddd7dad23194fa9c4b54d9d01c355f6e65b1aab
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Thu Sep 28 15:20:37 2017 -0300

    new-task-row: make entry cover the whole row

 data/theme/Adwaita.css  |    4 +-
 data/ui/new-task-row.ui |   75 +++++++++++++++++-----------------------------
 2 files changed, 30 insertions(+), 49 deletions(-)
---
diff --git a/data/theme/Adwaita.css b/data/theme/Adwaita.css
index 3d68465..9309e1d 100644
--- a/data/theme/Adwaita.css
+++ b/data/theme/Adwaita.css
@@ -62,8 +62,8 @@ taskrow {
     box-shadow: 0 0 2px alpha(black, 0.33);
 }
 
-taskrow:dir(ltr) { padding-left: 6px;  }
-taskrow:dir(rtl) { padding-right: 6px; }
+taskrow:dir(ltr):not(.new-task-row) { padding-left: 6px;  }
+taskrow:dir(rtl):not(.new-task-row) { padding-right: 6px; }
 
 taskrow entry {
     padding: 6px;
diff --git a/data/ui/new-task-row.ui b/data/ui/new-task-row.ui
index 69cc873..b0d3c83 100644
--- a/data/ui/new-task-row.ui
+++ b/data/ui/new-task-row.ui
@@ -8,73 +8,54 @@
     <property name="selectable">False</property>
     <property name="height-request">38</property>
     <property name="margin">3</property>
+    <style>
+      <class name="new-task-row" />
+    </style>
+
     <child>
       <object class="GtkBox">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="margin-start">12</property>
-        <property name="spacing">6</property>
         <style>
           <class name="linked" />
         </style>
 
         <child>
-          <object class="GtkImage" id="add_task_image">
+          <object class="GtkEntry" id="entry">
             <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="halign">center</property>
-            <property name="valign">center</property>
-            <property name="icon_name">list-add-symbolic</property>
-            <property name="pixel-size">16</property>
+            <property name="can_focus">True</property>
+            <property name="hexpand">True</property>
+            <property name="placeholder-text" translatable="yes">New task…</property>
+            <property name="primary-icon-name">list-add-symbolic</property>
+            <signal name="activate" handler="entry_activated_cb" object="GtdNewTaskRow" swapped="yes" />
+            <style>
+              <class name="flat" />
+            </style>
           </object>
         </child>
 
         <child>
-          <object class="GtkBox">
+          <object class="GtkMenuButton" id="list_selector_button">
             <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <style>
-              <class name="linked" />
-            </style>
-
-            <child>
-              <object class="GtkEntry" id="entry">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="hexpand">True</property>
-                <property name="has-frame">False</property>
-                <property name="placeholder-text" translatable="yes">New task…</property>
-                <signal name="activate" handler="entry_activated_cb" object="GtdNewTaskRow" swapped="yes" />
-                <style>
-                  <class name="flat" />
-                </style>
-              </object>
-            </child>
-
+            <property name="can_focus">True</property>
+            <property name="popover">tasklist_popover</property>
             <child>
-              <object class="GtkMenuButton" id="list_selector_button">
+              <object class="GtkBox">
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="popover">tasklist_popover</property>
+                <property name="can_focus">False</property>
+                <property name="spacing">6</property>
+                <child>
+                  <object class="GtkImage" id="list_color_icon">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                  </object>
+                </child>
                 <child>
-                  <object class="GtkBox">
+                  <object class="GtkLabel" id="list_name_label">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="spacing">6</property>
-                    <child>
-                      <object class="GtkImage" id="list_color_icon">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="list_name_label">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="max_width_chars">20</property>
-                        <property name="ellipsize">end</property>
-                      </object>
-                    </child>
+                    <property name="max_width_chars">20</property>
+                    <property name="ellipsize">end</property>
                   </object>
                 </child>
               </object>


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