[gnome-calendar] week-grid: disconsider reported min-width for events
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] week-grid: disconsider reported min-width for events
- Date: Tue, 14 Mar 2017 23:55:17 +0000 (UTC)
commit 39d871d2efe831d67cfee3e7e547685d1f906cf7
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue Mar 14 20:50:53 2017 -0300
week-grid: disconsider reported min-width for events
Sometimes, we'll need to ignore the reported minimum sizes
to be able to set the width of events to an acceptable
size. This is the case of the week grid.
https://bugzilla.gnome.org/show_bug.cgi?id=780052
src/views/gcal-week-grid.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/src/views/gcal-week-grid.c b/src/views/gcal-week-grid.c
index 8f23991..891396d 100644
--- a/src/views/gcal-week-grid.c
+++ b/src/views/gcal-week-grid.c
@@ -687,7 +687,6 @@ gcal_week_grid_size_allocate (GtkWidget *widget,
guint64 events_at_range;
gint natural_height;
gint widget_index;
- gint min_width;
gint offset;
gint height;
gint width;
@@ -703,7 +702,6 @@ gcal_week_grid_size_allocate (GtkWidget *widget,
widget_index = get_event_index (overlaps, data->start, data->end);
/* Gtk complains about that */
- gtk_widget_get_preferred_width (event_widget, &min_width, NULL);
gtk_widget_get_preferred_height (event_widget, NULL, &natural_height);
/* Consider the margins of the child */
@@ -723,7 +721,7 @@ gcal_week_grid_size_allocate (GtkWidget *widget,
/* Setup the child position and size */
child_allocation.x = x;
child_allocation.y = (data->start % MINUTES_PER_DAY) * minutes_height + margin.top;
- child_allocation.width = MAX (width, min_width);
+ child_allocation.width = width;
child_allocation.height = height;
gtk_widget_size_allocate (event_widget, &child_allocation);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]