From 5cadbc708450a65ca7b5fa7479965f4371dc014d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 22 Oct 2016 16:41:12 +0200 Subject: [PATCH] paned: Don't check handle-size style property --- gtk/gtkpaned.c | 49 +------------------------------------------------ 1 file changed, 1 insertion(+), 48 deletions(-) diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c index e36f7dc929..5ecc415a02 100644 --- a/gtk/gtkpaned.c +++ b/gtk/gtkpaned.c @@ -1155,53 +1155,6 @@ gtk_paned_get_preferred_size_for_opposite_orientation (GtkWidget *widget, } } -static gint -get_number (GtkCssStyle *style, - guint property) -{ - double d = _gtk_css_number_value_get (gtk_css_style_get_value (style, property), 100.0); - - if (d < 1) - return ceil (d); - else - return floor (d); -} - -static void -gtk_paned_measure_handle (GtkCssGadget *gadget, - GtkOrientation orientation, - int size, - int *minimum, - int *natural, - int *minimum_baseline, - int *natural_baseline, - gpointer data) -{ - GtkWidget *widget = gtk_css_gadget_get_owner (gadget); - GtkCssStyle *style; - gint min_size; - - style = gtk_css_gadget_get_style (gadget); - if (orientation == GTK_ORIENTATION_HORIZONTAL) - min_size = get_number (style, GTK_CSS_PROPERTY_MIN_WIDTH); - else - min_size = get_number (style, GTK_CSS_PROPERTY_MIN_HEIGHT); - - if (min_size != 0) - *minimum = *natural = min_size; - else - { - GtkStyleContext *context; - - context = gtk_widget_get_style_context (widget); - gtk_style_context_save_to_node (context, gtk_css_gadget_get_node (gadget)); - gtk_widget_style_get (widget, "handle-size", &min_size, NULL); - gtk_style_context_restore (context); - - *minimum = *natural = min_size; - } -} - static void gtk_paned_measure (GtkCssGadget *gadget, GtkOrientation orientation, @@ -1915,7 +1868,7 @@ gtk_paned_init (GtkPaned *paned) GTK_WIDGET (paned), priv->gadget, NULL, - gtk_paned_measure_handle, + NULL, NULL, gtk_paned_render_handle, NULL,