summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2016-12-19 18:46:24 +0100
committerBenjamin Otte <otte@redhat.com>2016-12-20 18:01:12 +0100
commit95a2a5c54c6480b62be482145ee40c58a15b4bd8 (patch)
treeae488eed5cbb60642c282945cbdcb8a46a5a0a3e /gtk
parentf2f5941d651c1f6339f07410ca419c2a08f06169 (diff)
downloadgtk+-95a2a5c54c6480b62be482145ee40c58a15b4bd8.tar.gz
gtk: Remove GtkJunctionSides
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkcssgadget.c12
-rw-r--r--gtk/gtkcssnode.c13
-rw-r--r--gtk/gtkcssnodedeclaration.c25
-rw-r--r--gtk/gtkcssnodedeclarationprivate.h3
-rw-r--r--gtk/gtkcssnodeprivate.h3
-rw-r--r--gtk/gtkcustompaperunixdialog.c4
-rw-r--r--gtk/gtkenums.h26
-rw-r--r--gtk/gtkplacessidebar.c1
-rw-r--r--gtk/gtkpopover.c3
-rw-r--r--gtk/gtkrender.c60
-rw-r--r--gtk/gtkrenderbackground.c15
-rw-r--r--gtk/gtkrenderbackgroundprivate.h6
-rw-r--r--gtk/gtkrenderborder.c30
-rw-r--r--gtk/gtkrenderborderprivate.h6
-rw-r--r--gtk/gtkroundedbox.c21
-rw-r--r--gtk/gtkroundedboxprivate.h6
-rw-r--r--gtk/gtksnapshot.c6
-rw-r--r--gtk/gtkstylecontext.c45
-rw-r--r--gtk/gtkstylecontext.h6
19 files changed, 53 insertions, 238 deletions
diff --git a/gtk/gtkcssgadget.c b/gtk/gtkcssgadget.c
index 063d4f3b79..8fcc2d22fa 100644
--- a/gtk/gtkcssgadget.c
+++ b/gtk/gtkcssgadget.c
@@ -894,15 +894,13 @@ gtk_css_gadget_draw (GtkCssGadget *gadget,
x + margin.left,
y + margin.top,
width - margin.left - margin.right,
- height - margin.top - margin.bottom,
- gtk_css_node_get_junction_sides (priv->node));
+ height - margin.top - margin.bottom);
gtk_css_style_render_border (style,
cr,
x + margin.left,
y + margin.top,
width - margin.left - margin.right,
- height - margin.top - margin.bottom,
- gtk_css_node_get_junction_sides (priv->node));
+ height - margin.top - margin.bottom);
contents_x = x + margin.left + border.left + padding.left;
contents_y = y + margin.top + border.top + padding.top;
@@ -1036,13 +1034,11 @@ gtk_css_gadget_snapshot (GtkCssGadget *gadget,
gtk_css_style_snapshot_background (style,
snapshot,
width - margin.left - margin.right,
- height - margin.top - margin.bottom,
- gtk_css_node_get_junction_sides (priv->node));
+ height - margin.top - margin.bottom);
gtk_css_style_snapshot_border (style,
snapshot,
width - margin.left - margin.right,
- height - margin.top - margin.bottom,
- gtk_css_node_get_junction_sides (priv->node));
+ height - margin.top - margin.bottom);
gtk_snapshot_translate_2d (snapshot, - x - margin.left, - y - margin.top);
contents_x = x + margin.left + border.left + padding.left;
diff --git a/gtk/gtkcssnode.c b/gtk/gtkcssnode.c
index a923d8d45c..b363d7731e 100644
--- a/gtk/gtkcssnode.c
+++ b/gtk/gtkcssnode.c
@@ -1167,19 +1167,6 @@ gtk_css_node_get_state (GtkCssNode *cssnode)
return gtk_css_node_declaration_get_state (cssnode->decl);
}
-void
-gtk_css_node_set_junction_sides (GtkCssNode *cssnode,
- GtkJunctionSides junction_sides)
-{
- gtk_css_node_declaration_set_junction_sides (&cssnode->decl, junction_sides);
-}
-
-GtkJunctionSides
-gtk_css_node_get_junction_sides (GtkCssNode *cssnode)
-{
- return gtk_css_node_declaration_get_junction_sides (cssnode->decl);
-}
-
static void
gtk_css_node_clear_classes (GtkCssNode *cssnode)
{
diff --git a/gtk/gtkcssnodedeclaration.c b/gtk/gtkcssnodedeclaration.c
index cf888fc44e..05baa4898f 100644
--- a/gtk/gtkcssnodedeclaration.c
+++ b/gtk/gtkcssnodedeclaration.c
@@ -24,7 +24,6 @@
struct _GtkCssNodeDeclaration {
guint refcount;
- GtkJunctionSides junction_sides;
GType type;
const /* interned */ char *name;
const /* interned */ char *id;
@@ -101,7 +100,6 @@ gtk_css_node_declaration_new (void)
static GtkCssNodeDeclaration empty = {
1, /* need to own a ref ourselves so the copy-on-write path kicks in when people change things */
0,
- 0,
NULL,
NULL,
0,
@@ -130,25 +128,6 @@ gtk_css_node_declaration_unref (GtkCssNodeDeclaration *decl)
}
gboolean
-gtk_css_node_declaration_set_junction_sides (GtkCssNodeDeclaration **decl,
- GtkJunctionSides junction_sides)
-{
- if ((*decl)->junction_sides == junction_sides)
- return FALSE;
-
- gtk_css_node_declaration_make_writable (decl);
- (*decl)->junction_sides = junction_sides;
-
- return TRUE;
-}
-
-GtkJunctionSides
-gtk_css_node_declaration_get_junction_sides (const GtkCssNodeDeclaration *decl)
-{
- return decl->junction_sides;
-}
-
-gboolean
gtk_css_node_declaration_set_type (GtkCssNodeDeclaration **decl,
GType type)
{
@@ -382,7 +361,6 @@ gtk_css_node_declaration_hash (gconstpointer elem)
hash += classes[i];
}
- hash ^= ((guint) decl->junction_sides) << (sizeof (guint) * 8 - 5);
hash ^= decl->state;
return hash;
@@ -423,9 +401,6 @@ gtk_css_node_declaration_equal (gconstpointer elem1,
return FALSE;
}
- if (decl1->junction_sides != decl2->junction_sides)
- return FALSE;
-
return TRUE;
}
diff --git a/gtk/gtkcssnodedeclarationprivate.h b/gtk/gtkcssnodedeclarationprivate.h
index 91e59c63ff..d927d42a15 100644
--- a/gtk/gtkcssnodedeclarationprivate.h
+++ b/gtk/gtkcssnodedeclarationprivate.h
@@ -28,9 +28,6 @@ GtkCssNodeDeclaration * gtk_css_node_declaration_new (void);
GtkCssNodeDeclaration * gtk_css_node_declaration_ref (GtkCssNodeDeclaration *decl);
void gtk_css_node_declaration_unref (GtkCssNodeDeclaration *decl);
-gboolean gtk_css_node_declaration_set_junction_sides (GtkCssNodeDeclaration **decl,
- GtkJunctionSides junction_sides);
-GtkJunctionSides gtk_css_node_declaration_get_junction_sides (const GtkCssNodeDeclaration *decl);
gboolean gtk_css_node_declaration_set_type (GtkCssNodeDeclaration **decl,
GType type);
GType gtk_css_node_declaration_get_type (const GtkCssNodeDeclaration *decl);
diff --git a/gtk/gtkcssnodeprivate.h b/gtk/gtkcssnodeprivate.h
index 9ff1e878d2..797c51de8b 100644
--- a/gtk/gtkcssnodeprivate.h
+++ b/gtk/gtkcssnodeprivate.h
@@ -129,9 +129,6 @@ void gtk_css_node_set_id (GtkCssNode *
void gtk_css_node_set_state (GtkCssNode *cssnode,
GtkStateFlags state_flags);
GtkStateFlags gtk_css_node_get_state (GtkCssNode *cssnode);
-void gtk_css_node_set_junction_sides (GtkCssNode *cssnode,
- GtkJunctionSides junction_sides);
-GtkJunctionSides gtk_css_node_get_junction_sides (GtkCssNode *cssnode);
void gtk_css_node_set_classes (GtkCssNode *cssnode,
const char **classes);
char ** gtk_css_node_get_classes (GtkCssNode *cssnode);
diff --git a/gtk/gtkcustompaperunixdialog.c b/gtk/gtkcustompaperunixdialog.c
index e73451a1c0..9bfa7be0ab 100644
--- a/gtk/gtkcustompaperunixdialog.c
+++ b/gtk/gtkcustompaperunixdialog.c
@@ -1051,9 +1051,6 @@ populate_dialog (GtkCustomPaperUnixDialog *dialog)
gtk_box_pack_start (GTK_BOX (vbox), scrolled, TRUE, TRUE);
gtk_widget_show (scrolled);
- context = gtk_widget_get_style_context (scrolled);
- gtk_style_context_set_junction_sides (context, GTK_JUNCTION_BOTTOM);
-
treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (priv->custom_paper_list));
priv->treeview = treeview;
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview), FALSE);
@@ -1080,7 +1077,6 @@ populate_dialog (GtkCustomPaperUnixDialog *dialog)
gtk_toolbar_set_icon_size (GTK_TOOLBAR (toolbar), GTK_ICON_SIZE_MENU);
context = gtk_widget_get_style_context (toolbar);
- gtk_style_context_set_junction_sides (context, GTK_JUNCTION_TOP);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_INLINE_TOOLBAR);
gtk_box_pack_start (GTK_BOX (vbox), toolbar, FALSE, FALSE);
diff --git a/gtk/gtkenums.h b/gtk/gtkenums.h
index 65ef2c516b..bf3da9f93e 100644
--- a/gtk/gtkenums.h
+++ b/gtk/gtkenums.h
@@ -810,32 +810,6 @@ typedef enum
} GtkStateFlags;
/**
- * GtkJunctionSides:
- * @GTK_JUNCTION_NONE: No junctions.
- * @GTK_JUNCTION_CORNER_TOPLEFT: Element connects on the top-left corner.
- * @GTK_JUNCTION_CORNER_TOPRIGHT: Element connects on the top-right corner.
- * @GTK_JUNCTION_CORNER_BOTTOMLEFT: Element connects on the bottom-left corner.
- * @GTK_JUNCTION_CORNER_BOTTOMRIGHT: Element connects on the bottom-right corner.
- * @GTK_JUNCTION_TOP: Element connects on the top side.
- * @GTK_JUNCTION_BOTTOM: Element connects on the bottom side.
- * @GTK_JUNCTION_LEFT: Element connects on the left side.
- * @GTK_JUNCTION_RIGHT: Element connects on the right side.
- *
- * Describes how a rendered element connects to adjacent elements.
- */
-typedef enum {
- GTK_JUNCTION_NONE = 0,
- GTK_JUNCTION_CORNER_TOPLEFT = 1 << 0,
- GTK_JUNCTION_CORNER_TOPRIGHT = 1 << 1,
- GTK_JUNCTION_CORNER_BOTTOMLEFT = 1 << 2,
- GTK_JUNCTION_CORNER_BOTTOMRIGHT = 1 << 3,
- GTK_JUNCTION_TOP = (GTK_JUNCTION_CORNER_TOPLEFT | GTK_JUNCTION_CORNER_TOPRIGHT),
- GTK_JUNCTION_BOTTOM = (GTK_JUNCTION_CORNER_BOTTOMLEFT | GTK_JUNCTION_CORNER_BOTTOMRIGHT),
- GTK_JUNCTION_LEFT = (GTK_JUNCTION_CORNER_TOPLEFT | GTK_JUNCTION_CORNER_BOTTOMLEFT),
- GTK_JUNCTION_RIGHT = (GTK_JUNCTION_CORNER_TOPRIGHT | GTK_JUNCTION_CORNER_BOTTOMRIGHT)
-} GtkJunctionSides;
-
-/**
* GtkBorderStyle:
* @GTK_BORDER_STYLE_NONE: No visible border
* @GTK_BORDER_STYLE_SOLID: A single line segment
diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c
index e89634f56a..07a7250017 100644
--- a/gtk/gtkplacessidebar.c
+++ b/gtk/gtkplacessidebar.c
@@ -3787,7 +3787,6 @@ gtk_places_sidebar_init (GtkPlacesSidebar *sidebar)
context = gtk_widget_get_style_context (GTK_WIDGET (sidebar));
gtk_style_context_add_class (context, GTK_STYLE_CLASS_SIDEBAR);
- gtk_style_context_set_junction_sides (context, GTK_JUNCTION_RIGHT | GTK_JUNCTION_LEFT);
/* list box */
sidebar->list_box = gtk_list_box_new ();
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c
index 298d245b37..6e8ba94c96 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -920,8 +920,7 @@ gtk_popover_fill_border_path (GtkPopover *popover,
_gtk_rounded_box_init_rect (&box, x, y, w, h);
_gtk_rounded_box_apply_border_radius_for_style (&box,
- gtk_style_context_lookup_style (context),
- 0);
+ gtk_style_context_lookup_style (context));
gsk_rounded_rect_path (&box, cr);
cairo_fill (cr);
}
diff --git a/gtk/gtkrender.c b/gtk/gtkrender.c
index 1c279f693f..7ff34275de 100644
--- a/gtk/gtkrender.c
+++ b/gtk/gtkrender.c
@@ -260,8 +260,7 @@ gtk_render_background (GtkStyleContext *context,
return;
gtk_css_style_render_background (gtk_style_context_lookup_style (context),
- cr, x, y, width, height,
- gtk_style_context_get_junction_sides (context));
+ cr, x, y, width, height);
}
/**
@@ -331,8 +330,7 @@ gtk_render_frame (GtkStyleContext *context,
gtk_css_style_render_border (gtk_style_context_lookup_style (context),
cr,
- x, y, width, height,
- gtk_style_context_get_junction_sides (context));
+ x, y, width, height);
}
static void
@@ -582,19 +580,15 @@ gtk_do_render_slider (GtkStyleContext *context,
GtkOrientation orientation)
{
GtkCssStyle *style;
- GtkJunctionSides junction;
style = gtk_style_context_lookup_style (context);
- junction = gtk_style_context_get_junction_sides (context);
gtk_css_style_render_background (style,
cr,
- x, y, width, height,
- junction);
+ x, y, width, height);
gtk_css_style_render_border (style,
cr,
- x, y, width, height,
- junction);
+ x, y, width, height);
}
/**
@@ -644,11 +638,9 @@ gtk_css_style_render_frame_gap (GtkCssStyle *style,
gdouble height,
GtkPositionType gap_side,
gdouble xy0_gap,
- gdouble xy1_gap,
- GtkJunctionSides junction)
+ gdouble xy1_gap)
{
gint border_width;
- GtkCssValue *corner[4];
gdouble x0, y0, x1, y1, xc = 0.0, yc = 0.0, wc = 0.0, hc = 0.0;
GtkBorder border;
@@ -656,10 +648,6 @@ gtk_css_style_render_frame_gap (GtkCssStyle *style,
border.right = _gtk_css_number_value_get (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_RIGHT_WIDTH), 100);
border.bottom = _gtk_css_number_value_get (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_BOTTOM_WIDTH), 100);
border.left = _gtk_css_number_value_get (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_LEFT_WIDTH), 100);
- corner[GSK_CORNER_TOP_LEFT] = gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_TOP_LEFT_RADIUS);
- corner[GSK_CORNER_TOP_RIGHT] = gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_TOP_RIGHT_RADIUS);
- corner[GSK_CORNER_BOTTOM_LEFT] = gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_BOTTOM_LEFT_RADIUS);
- corner[GSK_CORNER_BOTTOM_RIGHT] = gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_BOTTOM_RIGHT_RADIUS);
border_width = MIN (MIN (border.top, border.bottom),
MIN (border.left, border.right));
@@ -673,51 +661,27 @@ gtk_css_style_render_frame_gap (GtkCssStyle *style,
yc = y;
wc = MAX (xy1_gap - xy0_gap - 2 * border_width, 0);
hc = border_width;
-
- if (xy0_gap < _gtk_css_corner_value_get_x (corner[GSK_CORNER_TOP_LEFT], width))
- junction |= GTK_JUNCTION_CORNER_TOPLEFT;
-
- if (xy1_gap > width - _gtk_css_corner_value_get_x (corner[GSK_CORNER_TOP_RIGHT], width))
- junction |= GTK_JUNCTION_CORNER_TOPRIGHT;
break;
+
case GTK_POS_BOTTOM:
xc = x + xy0_gap + border_width;
yc = y + height - border_width;
wc = MAX (xy1_gap - xy0_gap - 2 * border_width, 0);
hc = border_width;
-
- if (xy0_gap < _gtk_css_corner_value_get_x (corner[GSK_CORNER_BOTTOM_LEFT], width))
- junction |= GTK_JUNCTION_CORNER_BOTTOMLEFT;
-
- if (xy1_gap > width - _gtk_css_corner_value_get_x (corner[GSK_CORNER_BOTTOM_RIGHT], width))
- junction |= GTK_JUNCTION_CORNER_BOTTOMRIGHT;
-
break;
+
case GTK_POS_LEFT:
xc = x;
yc = y + xy0_gap + border_width;
wc = border_width;
hc = MAX (xy1_gap - xy0_gap - 2 * border_width, 0);
-
- if (xy0_gap < _gtk_css_corner_value_get_y (corner[GSK_CORNER_TOP_LEFT], height))
- junction |= GTK_JUNCTION_CORNER_TOPLEFT;
-
- if (xy1_gap > height - _gtk_css_corner_value_get_y (corner[GSK_CORNER_BOTTOM_LEFT], height))
- junction |= GTK_JUNCTION_CORNER_BOTTOMLEFT;
-
break;
+
case GTK_POS_RIGHT:
xc = x + width - border_width;
yc = y + xy0_gap + border_width;
wc = border_width;
hc = MAX (xy1_gap - xy0_gap - 2 * border_width, 0);
-
- if (xy0_gap < _gtk_css_corner_value_get_y (corner[GSK_CORNER_TOP_RIGHT], height))
- junction |= GTK_JUNCTION_CORNER_TOPRIGHT;
-
- if (xy1_gap > height - _gtk_css_corner_value_get_y (corner[GSK_CORNER_BOTTOM_RIGHT], height))
- junction |= GTK_JUNCTION_CORNER_BOTTOMRIGHT;
-
break;
}
@@ -729,8 +693,7 @@ gtk_css_style_render_frame_gap (GtkCssStyle *style,
cairo_clip (cr);
gtk_css_style_render_border (style, cr,
- x, y, width, height,
- junction);
+ x, y, width, height);
cairo_restore (cr);
}
@@ -786,8 +749,7 @@ gtk_render_frame_gap (GtkStyleContext *context,
gtk_css_style_render_frame_gap (gtk_style_context_lookup_style (context),
cr,
x, y, width, height, gap_side,
- xy0_gap, xy1_gap,
- gtk_style_context_get_junction_sides (context));
+ xy0_gap, xy1_gap);
}
static void
@@ -982,7 +944,7 @@ gtk_render_content_path (GtkStyleContext *context,
g_return_if_fail (cr != NULL);
_gtk_rounded_box_init_rect (&box, x, y, width, height);
- _gtk_rounded_box_apply_border_radius_for_style (&box, gtk_style_context_lookup_style (context), 0);
+ _gtk_rounded_box_apply_border_radius_for_style (&box, gtk_style_context_lookup_style (context));
gsk_rounded_rect_shrink (&box,
_gtk_css_number_value_get (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BORDER_TOP_WIDTH), 100)
diff --git a/gtk/gtkrenderbackground.c b/gtk/gtkrenderbackground.c
index 1e2a5e672a..ae80f5fefc 100644
--- a/gtk/gtkrenderbackground.c
+++ b/gtk/gtkrenderbackground.c
@@ -527,8 +527,7 @@ static void
gtk_theming_background_init (GtkThemingBackground *bg,
GtkCssStyle *style,
double width,
- double height,
- GtkJunctionSides junction)
+ double height)
{
GtkBorder border, padding;
@@ -552,7 +551,7 @@ gtk_theming_background_init (GtkThemingBackground *bg,
* right now we just shrink to the default.
*/
_gtk_rounded_box_init_rect (&bg->boxes[GTK_CSS_AREA_BORDER_BOX], 0, 0, width, height);
- _gtk_rounded_box_apply_border_radius_for_style (&bg->boxes[GTK_CSS_AREA_BORDER_BOX], bg->style, junction);
+ _gtk_rounded_box_apply_border_radius_for_style (&bg->boxes[GTK_CSS_AREA_BORDER_BOX], bg->style);
bg->boxes[GTK_CSS_AREA_PADDING_BOX] = bg->boxes[GTK_CSS_AREA_BORDER_BOX];
gsk_rounded_rect_shrink (&bg->boxes[GTK_CSS_AREA_PADDING_BOX],
@@ -571,8 +570,7 @@ gtk_css_style_render_background (GtkCssStyle *style,
gdouble x,
gdouble y,
gdouble width,
- gdouble height,
- GtkJunctionSides junction)
+ gdouble height)
{
GtkThemingBackground bg;
gint idx;
@@ -593,7 +591,7 @@ gtk_css_style_render_background (GtkCssStyle *style,
_gtk_css_shadows_value_is_none (box_shadow))
return;
- gtk_theming_background_init (&bg, style, width, height, junction);
+ gtk_theming_background_init (&bg, style, width, height);
cairo_save (cr);
cairo_translate (cr, x, y);
@@ -650,8 +648,7 @@ void
gtk_css_style_snapshot_background (GtkCssStyle *style,
GtkSnapshot *snapshot,
gdouble width,
- gdouble height,
- GtkJunctionSides junction)
+ gdouble height)
{
GtkThemingBackground bg;
gint idx;
@@ -671,7 +668,7 @@ gtk_css_style_snapshot_background (GtkCssStyle *style,
_gtk_css_shadows_value_is_none (box_shadow))
return;
- gtk_theming_background_init (&bg, style, width, height, junction);
+ gtk_theming_background_init (&bg, style, width, height);
gtk_css_shadows_value_snapshot_outset (box_shadow,
snapshot,
diff --git a/gtk/gtkrenderbackgroundprivate.h b/gtk/gtkrenderbackgroundprivate.h
index e4bf2ba599..dd7f2f98dc 100644
--- a/gtk/gtkrenderbackgroundprivate.h
+++ b/gtk/gtkrenderbackgroundprivate.h
@@ -33,13 +33,11 @@ void gtk_css_style_render_background (GtkCssStyle
gdouble x,
gdouble y,
gdouble width,
- gdouble height,
- GtkJunctionSides junction);
+ gdouble height);
void gtk_css_style_snapshot_background (GtkCssStyle *style,
GtkSnapshot *snapshot,
gdouble width,
- gdouble height,
- GtkJunctionSides junction);
+ gdouble height);
diff --git a/gtk/gtkrenderborder.c b/gtk/gtkrenderborder.c
index 7f739c3d64..429ae39c73 100644
--- a/gtk/gtkrenderborder.c
+++ b/gtk/gtkrenderborder.c
@@ -870,13 +870,12 @@ gtk_css_style_render_has_border (GtkCssStyle *style)
}
void
-gtk_css_style_render_border (GtkCssStyle *style,
- cairo_t *cr,
- gdouble x,
- gdouble y,
- gdouble width,
- gdouble height,
- GtkJunctionSides junction)
+gtk_css_style_render_border (GtkCssStyle *style,
+ cairo_t *cr,
+ gdouble x,
+ gdouble y,
+ gdouble width,
+ gdouble height)
{
GtkBorderImage border_image;
double border_width[4];
@@ -914,18 +913,17 @@ gtk_css_style_render_border (GtkCssStyle *style,
colors[3] = *_gtk_css_rgba_value_get_rgba (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_LEFT_COLOR));
_gtk_rounded_box_init_rect (&border_box, x, y, width, height);
- _gtk_rounded_box_apply_border_radius_for_style (&border_box, style, junction);
+ _gtk_rounded_box_apply_border_radius_for_style (&border_box, style);
render_border (cr, &border_box, border_width, colors, border_style);
}
}
void
-gtk_css_style_snapshot_border (GtkCssStyle *style,
- GtkSnapshot *snapshot,
- gdouble width,
- gdouble height,
- GtkJunctionSides junction)
+gtk_css_style_snapshot_border (GtkCssStyle *style,
+ GtkSnapshot *snapshot,
+ gdouble width,
+ gdouble height)
{
GtkBorderImage border_image;
float border_width[4];
@@ -973,7 +971,7 @@ gtk_css_style_snapshot_border (GtkCssStyle *style,
colors[3] = *_gtk_css_rgba_value_get_rgba (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_LEFT_COLOR));
_gtk_rounded_box_init_rect (&border_box, 0, 0, width, height);
- _gtk_rounded_box_apply_border_radius_for_style (&border_box, style, junction);
+ _gtk_rounded_box_apply_border_radius_for_style (&border_box, style);
snapshot_border (snapshot, &border_box, border_width, colors, border_style);
}
@@ -1070,7 +1068,7 @@ gtk_css_style_render_outline (GtkCssStyle *style,
colors[3] = colors[2] = colors[1] = colors[0];
_gtk_rounded_box_init_rect (&border_box, rect.x, rect.y, rect.width, rect.height);
- _gtk_rounded_box_apply_outline_radius_for_style (&border_box, style, GTK_JUNCTION_NONE);
+ _gtk_rounded_box_apply_outline_radius_for_style (&border_box, style);
render_border (cr, &border_box, border_width, colors, border_style);
}
@@ -1101,7 +1099,7 @@ gtk_css_style_snapshot_outline (GtkCssStyle *style,
colors[3] = colors[2] = colors[1] = colors[0];
_gtk_rounded_box_init_rect (&border_box, rect.x, rect.y, rect.width, rect.height);
- _gtk_rounded_box_apply_outline_radius_for_style (&border_box, style, GTK_JUNCTION_NONE);
+ _gtk_rounded_box_apply_outline_radius_for_style (&border_box, style);
snapshot_border (snapshot, &border_box, border_width, colors, border_style);
}
diff --git a/gtk/gtkrenderborderprivate.h b/gtk/gtkrenderborderprivate.h
index 4de9d6da35..b9f94cf37c 100644
--- a/gtk/gtkrenderborderprivate.h
+++ b/gtk/gtkrenderborderprivate.h
@@ -35,8 +35,7 @@ void gtk_css_style_render_border (GtkCssStyle
gdouble x,
gdouble y,
gdouble width,
- gdouble height,
- GtkJunctionSides junction);
+ gdouble height);
gboolean gtk_css_style_render_border_get_clip (GtkCssStyle *style,
gdouble x,
gdouble y,
@@ -46,8 +45,7 @@ gboolean gtk_css_style_render_border_get_clip (GtkCssStyle
void gtk_css_style_snapshot_border (GtkCssStyle *style,
GtkSnapshot *snapshot,
gdouble width,
- gdouble height,
- GtkJunctionSides junction);
+ gdouble height);
gboolean gtk_css_style_render_has_outline (GtkCssStyle *style);
void gtk_css_style_render_outline (GtkCssStyle *style,
diff --git a/gtk/gtkroundedbox.c b/gtk/gtkroundedbox.c
index e51722f6a6..11430c0a70 100644
--- a/gtk/gtkroundedbox.c
+++ b/gtk/gtkroundedbox.c
@@ -86,31 +86,30 @@ gtk_rounded_box_clamp_border_radius (GskRoundedRect *box)
static void
_gtk_rounded_box_apply_border_radius (GskRoundedRect *box,
- GtkCssValue **corner,
- GtkJunctionSides junction)
+ GtkCssValue **corner)
{
- if (corner[GSK_CORNER_TOP_LEFT] && (junction & GTK_JUNCTION_CORNER_TOPLEFT) == 0)
+ if (corner[GSK_CORNER_TOP_LEFT])
{
box->corner[GSK_CORNER_TOP_LEFT].width = _gtk_css_corner_value_get_x (corner[GSK_CORNER_TOP_LEFT],
box->bounds.size.width);
box->corner[GSK_CORNER_TOP_LEFT].height = _gtk_css_corner_value_get_y (corner[GSK_CORNER_TOP_LEFT],
box->bounds.size.height);
}
- if (corner[GSK_CORNER_TOP_RIGHT] && (junction & GTK_JUNCTION_CORNER_TOPRIGHT) == 0)
+ if (corner[GSK_CORNER_TOP_RIGHT])
{
box->corner[GSK_CORNER_TOP_RIGHT].width = _gtk_css_corner_value_get_x (corner[GSK_CORNER_TOP_RIGHT],
box->bounds.size.width);
box->corner[GSK_CORNER_TOP_RIGHT].height = _gtk_css_corner_value_get_y (corner[GSK_CORNER_TOP_RIGHT],
box->bounds.size.height);
}
- if (corner[GSK_CORNER_BOTTOM_RIGHT] && (junction & GTK_JUNCTION_CORNER_BOTTOMRIGHT) == 0)
+ if (corner[GSK_CORNER_BOTTOM_RIGHT])
{
box->corner[GSK_CORNER_BOTTOM_RIGHT].width = _gtk_css_corner_value_get_x (corner[GSK_CORNER_BOTTOM_RIGHT],
box->bounds.size.width);
box->corner[GSK_CORNER_BOTTOM_RIGHT].height = _gtk_css_corner_value_get_y (corner[GSK_CORNER_BOTTOM_RIGHT],
box->bounds.size.height);
}
- if (corner[GSK_CORNER_BOTTOM_LEFT] && (junction & GTK_JUNCTION_CORNER_BOTTOMLEFT) == 0)
+ if (corner[GSK_CORNER_BOTTOM_LEFT])
{
box->corner[GSK_CORNER_BOTTOM_LEFT].width = _gtk_css_corner_value_get_x (corner[GSK_CORNER_BOTTOM_LEFT],
box->bounds.size.width);
@@ -123,8 +122,7 @@ _gtk_rounded_box_apply_border_radius (GskRoundedRect *box,
void
_gtk_rounded_box_apply_border_radius_for_style (GskRoundedRect *box,
- GtkCssStyle *style,
- GtkJunctionSides junction)
+ GtkCssStyle *style)
{
GtkCssValue *corner[4];
@@ -133,13 +131,12 @@ _gtk_rounded_box_apply_border_radius_for_style (GskRoundedRect *box,
corner[GSK_CORNER_BOTTOM_LEFT] = gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_BOTTOM_LEFT_RADIUS);
corner[GSK_CORNER_BOTTOM_RIGHT] = gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_BOTTOM_RIGHT_RADIUS);
- _gtk_rounded_box_apply_border_radius (box, corner, junction);
+ _gtk_rounded_box_apply_border_radius (box, corner);
}
void
_gtk_rounded_box_apply_outline_radius_for_style (GskRoundedRect *box,
- GtkCssStyle *style,
- GtkJunctionSides junction)
+ GtkCssStyle *style)
{
GtkCssValue *corner[4];
@@ -148,7 +145,7 @@ _gtk_rounded_box_apply_outline_radius_for_style (GskRoundedRect *box,
corner[GSK_CORNER_BOTTOM_LEFT] = gtk_css_style_get_value (style, GTK_CSS_PROPERTY_OUTLINE_BOTTOM_LEFT_RADIUS);
corner[GSK_CORNER_BOTTOM_RIGHT] = gtk_css_style_get_value (style, GTK_CSS_PROPERTY_OUTLINE_BOTTOM_RIGHT_RADIUS);
- _gtk_rounded_box_apply_border_radius (box, corner, junction);
+ _gtk_rounded_box_apply_border_radius (box, corner);
}
typedef struct {
diff --git a/gtk/gtkroundedboxprivate.h b/gtk/gtkroundedboxprivate.h
index 98ebec0d9e..55f72d739a 100644
--- a/gtk/gtkroundedboxprivate.h
+++ b/gtk/gtkroundedboxprivate.h
@@ -35,12 +35,10 @@ void _gtk_rounded_box_init_rect (GskRoundedRect
double height);
void _gtk_rounded_box_apply_border_radius_for_style (GskRoundedRect *box,
- GtkCssStyle *style,
- GtkJunctionSides junction);
+ GtkCssStyle *style);
void _gtk_rounded_box_apply_outline_radius_for_style (GskRoundedRect *box,
- GtkCssStyle *style,
- GtkJunctionSides junction);
+ GtkCssStyle *style);
double _gtk_rounded_box_guess_length (const GskRoundedRect *box,
GtkCssSide side);
diff --git a/gtk/gtksnapshot.c b/gtk/gtksnapshot.c
index 06895d6ad3..9c9161b76c 100644
--- a/gtk/gtksnapshot.c
+++ b/gtk/gtksnapshot.c
@@ -890,8 +890,7 @@ gtk_snapshot_render_background (GtkSnapshot *snapshot,
gtk_snapshot_translate_2d (snapshot, x, y);
gtk_css_style_snapshot_background (gtk_style_context_lookup_style (context),
snapshot,
- width, height,
- gtk_style_context_get_junction_sides (context));
+ width, height);
gtk_snapshot_translate_2d (snapshot, -x, -y);
}
@@ -924,8 +923,7 @@ gtk_snapshot_render_frame (GtkSnapshot *snapshot,
gtk_snapshot_translate_2d (snapshot, x, y);
gtk_css_style_snapshot_border (gtk_style_context_lookup_style (context),
snapshot,
- width, height,
- gtk_style_context_get_junction_sides (context));
+ width, height);
gtk_snapshot_translate_2d (snapshot, -x, -y);
}
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index 3ff0625257..683bee8752 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -1708,51 +1708,6 @@ gtk_style_context_get_frame_clock (GtkStyleContext *context)
return context->priv->frame_clock;
}
-/**
- * gtk_style_context_set_junction_sides:
- * @context: a #GtkStyleContext
- * @sides: sides where rendered elements are visually connected to
- * other elements
- *
- * Sets the sides where rendered elements (mostly through
- * gtk_render_frame()) will visually connect with other visual elements.
- *
- * This is merely a hint that may or may not be honored
- * by themes.
- *
- * Container widgets are expected to set junction hints as appropriate
- * for their children, so it should not normally be necessary to call
- * this function manually.
- *
- * Since: 3.0
- **/
-void
-gtk_style_context_set_junction_sides (GtkStyleContext *context,
- GtkJunctionSides sides)
-{
- g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
-
- gtk_css_node_set_junction_sides (context->priv->cssnode, sides);
-}
-
-/**
- * gtk_style_context_get_junction_sides:
- * @context: a #GtkStyleContext
- *
- * Returns the sides where rendered elements connect visually with others.
- *
- * Returns: the junction sides
- *
- * Since: 3.0
- **/
-GtkJunctionSides
-gtk_style_context_get_junction_sides (GtkStyleContext *context)
-{
- g_return_val_if_fail (GTK_IS_STYLE_CONTEXT (context), 0);
-
- return gtk_css_node_get_junction_sides (context->priv->cssnode);
-}
-
gboolean
_gtk_style_context_resolve_color (GtkStyleContext *context,
GtkCssValue *color,
diff --git a/gtk/gtkstylecontext.h b/gtk/gtkstylecontext.h
index 730e616fdb..59ff1993b7 100644
--- a/gtk/gtkstylecontext.h
+++ b/gtk/gtkstylecontext.h
@@ -1072,12 +1072,6 @@ GDK_AVAILABLE_IN_3_8
GdkFrameClock *gtk_style_context_get_frame_clock (GtkStyleContext *context);
GDK_AVAILABLE_IN_ALL
-void gtk_style_context_set_junction_sides (GtkStyleContext *context,
- GtkJunctionSides sides);
-GDK_AVAILABLE_IN_ALL
-GtkJunctionSides gtk_style_context_get_junction_sides (GtkStyleContext *context);
-
-GDK_AVAILABLE_IN_ALL
gboolean gtk_style_context_lookup_color (GtkStyleContext *context,
const gchar *color_name,
GdkRGBA *color);