diff options
author | Benjamin Otte <otte@redhat.com> | 2013-11-15 04:16:33 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2013-11-15 04:33:38 +0100 |
commit | 06a64ccfcff37cfe2554a5ac239d9a6ad380c321 (patch) | |
tree | 9e7098ca1367a9d7f993b6b4b553ba41e797bcf3 /gtk/gtkstylecontext.c | |
parent | f4f82e736c9608b7147f0b51141fd2d5bc2e0fce (diff) | |
download | gtk+-06a64ccfcff37cfe2554a5ac239d9a6ad380c321.tar.gz |
stylecontext: Revert part of previous commit
Commit 719dd636a9da679ea08a9644a8cccfe7d6f145d7 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.
Diffstat (limited to 'gtk/gtkstylecontext.c')
-rw-r--r-- | gtk/gtkstylecontext.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c index d883c9fe9a..9f35f42c82 100644 --- a/gtk/gtkstylecontext.c +++ b/gtk/gtkstylecontext.c @@ -3634,26 +3634,23 @@ gtk_style_context_get_margin (GtkStyleContext *context, GtkStateFlags state, GtkBorder *margin) { - int top, start, bottom, end; - gboolean rtl; + int top, left, bottom, right; g_return_if_fail (margin != NULL); 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, state, "margin-top", &top, - "margin-start", &start, + "margin-left", &left, "margin-bottom", &bottom, - "margin-end", &end, + "margin-right", &right, NULL); margin->top = top; - margin->left = rtl ? start : end; + margin->left = left; margin->bottom = bottom; - margin->right = rtl ? end : start; + margin->right = right; } /** |