summaryrefslogtreecommitdiff
path: root/gtk/gtktexthandle.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2020-01-28 00:27:36 +0100
committerBenjamin Otte <otte@redhat.com>2020-01-28 02:58:02 +0100
commit632fab0ca702b600fde492319ab0aa2d9d3bbd08 (patch)
treecf0972443ecdf15fb833cf5be7cbbed754124153 /gtk/gtktexthandle.c
parent43339f1c1c9d4330679a92affac71df71ef5fc40 (diff)
downloadgtk+-632fab0ca702b600fde492319ab0aa2d9d3bbd08.tar.gz
stylecontext: Get rid of gtk_style_context_get()
... and replace all the calls to it with gtk_style_context_peek_property(). All the calls are hacks that need to go away btw.
Diffstat (limited to 'gtk/gtktexthandle.c')
-rw-r--r--gtk/gtktexthandle.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gtk/gtktexthandle.c b/gtk/gtktexthandle.c
index 2d3d148ac7..3f993920ba 100644
--- a/gtk/gtktexthandle.c
+++ b/gtk/gtktexthandle.c
@@ -16,6 +16,8 @@
*/
#include "config.h"
+
+#include "gtkcssnumbervalueprivate.h"
#include "gtkprivatetypebuiltins.h"
#include "gtktexthandleprivate.h"
#include "gtkmarshalers.h"
@@ -25,6 +27,7 @@
#include "gtkwidgetprivate.h"
#include "gtkgizmoprivate.h"
#include "gtkrendericonprivate.h"
+#include "gtkstylecontextprivate.h"
#include "gtkintl.h"
#include <gtk/gtk.h>
@@ -89,11 +92,9 @@ _gtk_text_handle_get_size (GtkTextHandle *handle,
GtkStyleContext *context;
context = gtk_widget_get_style_context (widget);
-
- gtk_style_context_get (context,
- "min-width", width,
- "min-height", height,
- NULL);
+
+ *width = _gtk_css_number_value_get (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_MIN_WIDTH), 100);
+ *height = _gtk_css_number_value_get (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_MIN_HEIGHT), 100);
}
static gint