Commit b68a28fb authored by Matthias Clasen's avatar Matthias Clasen

GtkColorSwatch: Respect an explicitly set size

This will let us use a suitably sized color swatch in the color
button.
parent 86cceab7
......@@ -353,7 +353,14 @@ swatch_get_preferred_width (GtkWidget *widget,
gint *min,
gint *nat)
{
*min = *nat = 48;
gint w, h;
gtk_widget_get_size_request (widget, &w, &h);
if (w < 0)
w = 48;
*min = *nat = w;
}
static void
......@@ -361,7 +368,14 @@ swatch_get_preferred_height (GtkWidget *widget,
gint *min,
gint *nat)
{
*min = *nat = 32;
gint w, h;
gtk_widget_get_size_request (widget, &w, &h);
if (h < 0)
h = 32;
*min = *nat = h;
}
static gboolean
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment