[gnome-calendar] event-editor-dialog: Make it resizable



commit 598e9814fc64b5478555c25f65ae8b2386e5094a
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Fri Oct 15 13:10:47 2021 +0200

    event-editor-dialog: Make it resizable
    
    This also sets a reasonable default height and stops giving the scrolled
    window a max height. This will allows it to fit in phone screens.

 src/gui/event-editor/gcal-event-editor-dialog.c  | 5 -----
 src/gui/event-editor/gcal-event-editor-dialog.ui | 2 +-
 2 files changed, 1 insertion(+), 6 deletions(-)
---
diff --git a/src/gui/event-editor/gcal-event-editor-dialog.c b/src/gui/event-editor/gcal-event-editor-dialog.c
index 0d9eb085..e2f04234 100644
--- a/src/gui/event-editor/gcal-event-editor-dialog.c
+++ b/src/gui/event-editor/gcal-event-editor-dialog.c
@@ -58,7 +58,6 @@ struct _GcalEventEditorDialog
   GcalEventEditorSection *notes_section;
   GcalEventEditorSection *reminders_section;
   GcalEventEditorSection *schedule_section;
-  GtkWidget              *scrolled_window;
   GtkWidget              *sources_button;
   GtkWidget              *sources_popover;
   GtkWidget              *source_image;
@@ -272,9 +271,6 @@ transient_size_allocate_cb (GcalEventEditorDialog *self)
 
   transient = gtk_window_get_transient_for (GTK_WINDOW (self));
   gtk_widget_get_allocation (GTK_WIDGET (transient), &alloc);
-
-  gtk_scrolled_window_set_max_content_height (GTK_SCROLLED_WINDOW (self->scrolled_window),
-                                              MAX (400, (gint) (0.75 * alloc.height)));
 }
 
 static void
@@ -542,7 +538,6 @@ gcal_event_editor_dialog_class_init (GcalEventEditorDialogClass *klass)
   gtk_widget_class_bind_template_child (widget_class, GcalEventEditorDialog, notes_section);
   gtk_widget_class_bind_template_child (widget_class, GcalEventEditorDialog, reminders_section);
   gtk_widget_class_bind_template_child (widget_class, GcalEventEditorDialog, schedule_section);
-  gtk_widget_class_bind_template_child (widget_class, GcalEventEditorDialog, scrolled_window);
   gtk_widget_class_bind_template_child (widget_class, GcalEventEditorDialog, sources_button);
   gtk_widget_class_bind_template_child (widget_class, GcalEventEditorDialog, sources_popover);
   gtk_widget_class_bind_template_child (widget_class, GcalEventEditorDialog, source_image);
diff --git a/src/gui/event-editor/gcal-event-editor-dialog.ui 
b/src/gui/event-editor/gcal-event-editor-dialog.ui
index d7583121..f7b3251a 100644
--- a/src/gui/event-editor/gcal-event-editor-dialog.ui
+++ b/src/gui/event-editor/gcal-event-editor-dialog.ui
@@ -2,9 +2,9 @@
 <interface>
   <template class="GcalEventEditorDialog" parent="GtkDialog">
     <property name="can_focus">False</property>
-    <property name="resizable">False</property>
     <property name="modal">True</property>
     <property name="default-width">450</property>
+    <property name="default-height">500</property>
     <property name="window_position">center-on-parent</property>
     <property name="use_header_bar">1</property>
     <property name="destroy_with_parent">True</property>


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