month-popover: don't be so small

This commit limits the month popover at least
250px wide. To make it actually usable.
This commit is contained in:
Georges Basile Stavracas Neto
2018-05-01 20:29:57 -03:00
parent 1da2151bb9
commit df7216f2f5
+5
View File
@@ -26,6 +26,7 @@
#include <dazzle.h>
#define RATIO_TO_RELATIVE 1.25
#define MIN_WIDTH 250
struct _GcalMonthPopover
{
@@ -275,6 +276,8 @@ reposition_popover (GcalMonthPopover *self,
gtk_window_move (GTK_WINDOW (self), alloc.x - diff_w / 2, alloc.y - diff_h / 2);
alloc.width = MAX (MIN_WIDTH, alloc.width);
if (animate)
{
gtk_widget_set_size_request (GTK_WIDGET (self), alloc.width, alloc.height);
@@ -853,6 +856,8 @@ gcal_month_popover_popdown (GcalMonthPopover *self)
gtk_widget_get_toplevel (self->relative_to), 0, 0, &alloc.x, &alloc.y);
adjust_margin (self, &alloc);
alloc.width = MAX (MIN_WIDTH, alloc.width);
animate_opacity (self, 0.0);
animate_position (self, 0.0, 0.0);
animate_size (self, alloc.width, alloc.height);