Commit 10d5705b authored by Matthias Clasen's avatar Matthias Clasen
Browse files

Reduce use of GtkStyleContext

Remove some unnecessary uses of GtkStyleContext where
we can directly go to the GtkCssStyle, and and drop
unnnecessary includes.
parent 2d0d5797
......@@ -67,7 +67,6 @@
#include "gtkprivate.h"
#include "gtktypebuiltins.h"
#include "gtksizerequest.h"
#include "gtkstylecontextprivate.h"
#include "gtkwidgetprivate.h"
......
......@@ -20,7 +20,7 @@
#include "config.h"
#include "gtkstylecontextprivate.h"
#include "gtkcssnodeprivate.h"
#include "gtkcssnumbervalueprivate.h"
#include "gtkbuiltiniconprivate.h"
#include "gtkwidgetprivate.h"
......@@ -80,10 +80,11 @@ gtk_builtin_icon_measure (GtkWidget *widget,
int *minimum_baseline,
int *natural_baseline)
{
GtkCssValue *icon_size;
GtkCssStyle *style;
icon_size = _gtk_style_context_peek_property (gtk_widget_get_style_context (widget), GTK_CSS_PROPERTY_ICON_SIZE);
*minimum = *natural = _gtk_css_number_value_get (icon_size, 100);
style = gtk_css_node_get_style (gtk_widget_get_css_node (widget));
*minimum = *natural = _gtk_css_number_value_get (style->icon->icon_size, 100);
}
static void
......
......@@ -103,7 +103,6 @@
#include "gtkprivate.h"
#include "gtkrendericonprivate.h"
#include "gtksnapshot.h"
#include "gtkstylecontextprivate.h"
#include "gtkwidgetprivate.h"
#include "gtkgestureclick.h"
#include "gtkgesturedrag.h"
......
......@@ -35,7 +35,7 @@
#include "gtklabel.h"
#include "gtkprivate.h"
#include "gtkshortcuttrigger.h"
#include "gtkstylecontextprivate.h"
#include "gtkcssnodeprivate.h"
#include "gtkwidgetprivate.h"
#include "gtkmodelbuttonprivate.h"
......
......@@ -34,7 +34,6 @@
#include "gtkpopovermenu.h"
#include "gtkprivate.h"
#include "gtksnapshot.h"
#include "gtkstylecontextprivate.h"
#include "gtkwidgetprivate.h"
#include "gtkeventcontrollerkey.h"
#include "gtknative.h"
......
......@@ -20,7 +20,7 @@
#include "gtkcssinheritvalueprivate.h"
#include "gtkcssinitialvalueprivate.h"
#include "gtkstylecontextprivate.h"
#include "gtkcssstyleprivate.h"
struct _GtkCssValue {
GTK_CSS_VALUE_BASE
......
......@@ -30,7 +30,6 @@
#include "gtkcssshorthandpropertyprivate.h"
#include "gtksettingsprivate.h"
#include "gtkstyleprovider.h"
#include "gtkstylecontextprivate.h"
#include "gtkstylepropertyprivate.h"
#include "gtkstyleproviderprivate.h"
#include "gtkmarshalers.h"
......
......@@ -25,7 +25,6 @@
#include "gtkcssnumbervalueprivate.h"
#include "gtkcsscolorvalueprivate.h"
#include "gtksnapshotprivate.h"
#include "gtkstylecontextprivate.h"
#include "gtkpango.h"
#include "gsk/gskcairoblurprivate.h"
......
......@@ -54,7 +54,6 @@
#include "gtkprogressbar.h"
#include "gtksettings.h"
#include "gtksnapshot.h"
#include "gtkstylecontextprivate.h"
#include "gtktextprivate.h"
#include "gtktexthandleprivate.h"
#include "gtktextutil.h"
......
......@@ -127,7 +127,6 @@
#include "gtkmarshalers.h"
#include "gtkmain.h"
#include "gtkprivate.h"
#include "gtkstylecontextprivate.h"
#include "gtkwidgetprivate.h"
#include <string.h>
......
......@@ -66,7 +66,6 @@
#include "gtkshow.h"
#include "gtkmain.h"
#include "gtkscrollable.h"
#include "gtkstylecontextprivate.h"
#include "gtkpopover.h"
#include "gtkrevealer.h"
#include "gtkspinner.h"
......
......@@ -45,7 +45,6 @@
#include "gtkscrolledwindow.h"
#include "gtksearchentry.h"
#include "gtkspinbutton.h"
#include "gtkstylecontextprivate.h"
#include "gtktextview.h"
#include "gtkwidgetprivate.h"
#include "gtksettings.h"
......
......@@ -31,8 +31,6 @@
#include "gtkintl.h"
#include "gtkbuildable.h"
#include "gtkwidgetprivate.h"
#include "gtkstylecontextprivate.h"
#include "gtkcssstylepropertyprivate.h"
#include "gtklabel.h"
/**
......
......@@ -29,7 +29,7 @@
#include "gtkorientable.h"
#include "gtkprivate.h"
#include "gtksizerequest.h"
#include "gtkstylecontextprivate.h"
#include "gtkcssnodeprivate.h"
#include "gtkwidgetprivate.h"
......
......@@ -26,7 +26,6 @@
#include "gtkcssenumvalueprivate.h"
#include "gtkcssnumbervalueprivate.h"
#include "gtkcssstyleprivate.h"
#include "gtkcssstylepropertyprivate.h"
#include "gtkcsstransientnodeprivate.h"
#include "gtkiconthemeprivate.h"
#include "gtkrendericonprivate.h"
......
......@@ -26,7 +26,6 @@
#include "gtkimageprivate.h"
#include "gtkcssstylepropertyprivate.h"
#include "gtkiconhelperprivate.h"
#include "gtkicontheme.h"
#include "gtkintl.h"
......
......@@ -28,7 +28,6 @@
#include "gtkbuildable.h"
#include "gtkbuilderprivate.h"
#include "gtkcssstylepropertyprivate.h"
#include "gtkeventcontrollermotion.h"
#include "gtkeventcontrollerfocus.h"
#include "gtkgesturedrag.h"
......
......@@ -124,13 +124,12 @@
#include "gtkbinlayout.h"
#include "gtkbuildable.h"
#include "gtkbuilderprivate.h"
#include "gtkcssstylepropertyprivate.h"
#include "gtkgizmoprivate.h"
#include "gtkintl.h"
#include "gtklevelbar.h"
#include "gtkmarshalers.h"
#include "gtkorientable.h"
#include "gtkstylecontextprivate.h"
#include "gtkcssnodeprivate.h"
#include "gtktypebuiltins.h"
#include "gtkwidgetprivate.h"
......
......@@ -34,7 +34,6 @@
#include "gtkscrollable.h"
#include "gtksingleselection.h"
#include "gtksnapshot.h"
#include "gtkstylecontextprivate.h"
#include "gtktypebuiltins.h"
#include "gtkwidgetprivate.h"
......
......@@ -49,7 +49,6 @@
#include "gtkicontheme.h"
#include "gtkmain.h"
#include "gtksettings.h"
#include "gtkstylecontextprivate.h"
#include "gtkdialogprivate.h"
#include "gtkgestureclick.h"
#include "gtkmodelbuttonprivate.h"
......
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