[gnome-calendar/gbsneto/event-editor-improvements: 5/6] summary-section: Use expandable entries




commit 7a5580980bf3126ff72ae01a9f72dffad9516a9c
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Tue Nov 10 11:08:55 2020 -0300

    summary-section: Use expandable entries
    
    Now the entry grows as much as possible to accomodate the
    text.
    
    Fixes https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/153

 src/gui/event-editor/gcal-summary-section.c  | 3 +++
 src/gui/event-editor/gcal-summary-section.ui | 6 ++++--
 2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/gui/event-editor/gcal-summary-section.c b/src/gui/event-editor/gcal-summary-section.c
index e987bce5..97d0b99a 100644
--- a/src/gui/event-editor/gcal-summary-section.c
+++ b/src/gui/event-editor/gcal-summary-section.c
@@ -23,6 +23,7 @@
 #include "gcal-context.h"
 #include "gcal-debug.h"
 #include "gcal-event-editor-section.h"
+#include "gcal-expandable-entry.h"
 #include "gcal-summary-section.h"
 
 #include <glib/gi18n.h>
@@ -167,6 +168,8 @@ gcal_summary_section_class_init (GcalSummarySectionClass *klass)
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
   GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
 
+  g_type_ensure (GCAL_TYPE_EXPANDABLE_ENTRY);
+
   object_class->finalize = gcal_summary_section_finalize;
   object_class->get_property = gcal_summary_section_get_property;
   object_class->set_property = gcal_summary_section_set_property;
diff --git a/src/gui/event-editor/gcal-summary-section.ui b/src/gui/event-editor/gcal-summary-section.ui
index dcf45213..75a77b66 100644
--- a/src/gui/event-editor/gcal-summary-section.ui
+++ b/src/gui/event-editor/gcal-summary-section.ui
@@ -20,7 +20,7 @@
             <property name="activatable-widget">summary_entry</property>
 
             <child>
-              <object class="GtkEntry" id="summary_entry">
+              <object class="GcalExpandableEntry" id="summary_entry">
                 <property name="visible">True</property>
                 <property name="hexpand">True</property>
                 <property name="halign">end</property>
@@ -28,6 +28,7 @@
                 <property name="can_focus">True</property>
                 <property name="width-chars">20</property>
                 <property name="max-width-chars">30</property>
+                <property name="propagate-natural-width">True</property>
               </object>
             </child>
 
@@ -42,7 +43,7 @@
             <property name="activatable-widget">location_entry</property>
 
             <child>
-              <object class="GtkEntry" id="location_entry">
+              <object class="GcalExpandableEntry" id="location_entry">
                 <property name="visible">True</property>
                 <property name="hexpand">True</property>
                 <property name="halign">end</property>
@@ -51,6 +52,7 @@
                 <property name="width-chars">20</property>
                 <property name="max-width-chars">30</property>
                 <property name="secondary_icon_name">find-location-symbolic</property>
+                <property name="propagate-natural-width">True</property>
               </object>
             </child>
 


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