texthandle: Remove min-width/height handling
authorTimm Bäder <mail@baedert.org>
Sat, 16 May 2020 06:12:50 +0000 (08:12 +0200)
committerTimm Bäder <mail@baedert.org>
Sat, 16 May 2020 20:04:00 +0000 (22:04 +0200)
We do that automatically for all widgets.

gtk/gtktexthandle.c

index 72ac92bea0c6d78a1297e8c157fd964b1bc4bec2..7da012c9e7bd0ba792baa2fe47b7a772a3ae798b 100644 (file)
@@ -93,22 +93,6 @@ gtk_text_handle_native_get_surface_transform (GtkNative *native,
   *y = - margin_rect->origin.y;
 }
 
-static void
-gtk_text_handle_get_size (GtkTextHandle *handle,
-                          gint          *width,
-                          gint          *height)
-{
-  GtkWidget *widget = GTK_WIDGET (handle);
-  GtkStyleContext *context;
-
-  context = gtk_widget_get_style_context (widget);
-
-  if (width)
-    *width = _gtk_css_number_value_get (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_MIN_WIDTH), 100);
-  if (height)
-    *height = _gtk_css_number_value_get (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_MIN_HEIGHT), 100);
-}
-
 static void
 gtk_text_handle_get_padding (GtkTextHandle *handle,
                              GtkBorder     *border)
@@ -300,15 +284,8 @@ gtk_text_handle_measure (GtkWidget      *widget,
                          int            *minimum_baseline,
                          int            *natural_baseline)
 {
-  gint size;
-
-  if (orientation == GTK_ORIENTATION_VERTICAL)
-    gtk_text_handle_get_size (GTK_TEXT_HANDLE (widget), NULL, &size);
-  else
-    gtk_text_handle_get_size (GTK_TEXT_HANDLE (widget), &size, NULL);
-
-  *natural = size;
-  *minimum = size;
+  *natural = 0;
+  *minimum = 0;
   *minimum_baseline = -1;
   *natural_baseline = -1;
 }