From 2baa96d29fe507b7a802122aa7c654e522c29e10 Mon Sep 17 00:00:00 2001 From: Adrien Plazas Date: Thu, 5 May 2022 12:45:28 +0200 Subject: [PATCH] event-widget: Properly overflow This explicitely allows the hour widget and the content as a whole to overflow horizontally, and hides what overflows, keeping the data within the boundaries of the widget while still allowing it to reach very narrow sizes without error messages. This purposefully leaves the indentation broken to help reviewing the actual changes. --- src/gui/gcal-event-widget.c | 3 +++ src/gui/gcal-event-widget.ui | 13 +++++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/gui/gcal-event-widget.c b/src/gui/gcal-event-widget.c index 3132e6c9..b713cad1 100644 --- a/src/gui/gcal-event-widget.c +++ b/src/gui/gcal-event-widget.c @@ -28,6 +28,7 @@ #include "gcal-debug.h" #include "gcal-event-popover.h" #include "gcal-event-widget.h" +#include "gcal-overflow-bin.h" #include "gcal-utils.h" #define DESC_MAX_CHAR 200 @@ -759,6 +760,8 @@ gcal_event_widget_init (GcalEventWidget *self) widget = GTK_WIDGET (self); self->clock_format_24h = is_clock_format_24h (); + g_type_ensure (GCAL_TYPE_OVERFLOW_BIN); + gtk_widget_init_template (widget); gtk_widget_set_cursor_from_name (GTK_WIDGET (self), "pointer"); diff --git a/src/gui/gcal-event-widget.ui b/src/gui/gcal-event-widget.ui index 318c0e8c..d97e0cd0 100644 --- a/src/gui/gcal-event-widget.ui +++ b/src/gui/gcal-event-widget.ui @@ -1,6 +1,7 @@