forked from AuroraMiddleware/gtk
stylecontext: Revert part of previous commit
Commit 719dd636a9
replaces
margin-left/right with margin-start/end. CSS does not have
margin-start/margin-end properties, the sed script was a bit overeager.
Fwiw, CSS implements RTL margin styling via :dir(rtl) selectors.
This commit is contained in:
parent
f4f82e736c
commit
06a64ccfcf
@ -3634,26 +3634,23 @@ gtk_style_context_get_margin (GtkStyleContext *context,
|
|||||||
GtkStateFlags state,
|
GtkStateFlags state,
|
||||||
GtkBorder *margin)
|
GtkBorder *margin)
|
||||||
{
|
{
|
||||||
int top, start, bottom, end;
|
int top, left, bottom, right;
|
||||||
gboolean rtl;
|
|
||||||
|
|
||||||
g_return_if_fail (margin != NULL);
|
g_return_if_fail (margin != NULL);
|
||||||
g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
|
g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
|
||||||
|
|
||||||
rtl = (gtk_style_context_get_state (context) & GTK_STATE_FLAG_DIR_RTL);
|
|
||||||
|
|
||||||
gtk_style_context_get (context,
|
gtk_style_context_get (context,
|
||||||
state,
|
state,
|
||||||
"margin-top", &top,
|
"margin-top", &top,
|
||||||
"margin-start", &start,
|
"margin-left", &left,
|
||||||
"margin-bottom", &bottom,
|
"margin-bottom", &bottom,
|
||||||
"margin-end", &end,
|
"margin-right", &right,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
margin->top = top;
|
margin->top = top;
|
||||||
margin->left = rtl ? start : end;
|
margin->left = left;
|
||||||
margin->bottom = bottom;
|
margin->bottom = bottom;
|
||||||
margin->right = rtl ? end : start;
|
margin->right = right;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user