[gtk+/wip/cssnode3: 102/102] entry: Remove .left and .right style classes from images
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/cssnode3: 102/102] entry: Remove .left and .right style classes from images
- Date: Wed, 11 Mar 2015 00:24:59 +0000 (UTC)
commit 0888e9f85a3d6aa908a35ddaecd587db4c63e23b
Author: Benjamin Otte <otte redhat com>
Date: Wed Mar 11 01:14:29 2015 +0100
entry: Remove .left and .right style classes from images
Instead, rely on :first-child and :last-child respectively.
gtk/gtkentry.c | 4 ----
gtk/theme/Adwaita/_common.scss | 4 ++--
2 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 33b3309..4c3c354 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -3229,15 +3229,11 @@ update_state_for_icon_infos (GtkWidget *widget)
{
if (first_node != gtk_css_node_get_first_child (cssnode))
gtk_css_node_set_before (first_node, gtk_css_node_get_first_child (cssnode));
- gtk_css_node_remove_class (first_node, GTK_STYLE_CLASS_RIGHT);
- gtk_css_node_add_class (first_node, GTK_STYLE_CLASS_LEFT);
}
if (last_node)
{
if (last_node != gtk_css_node_get_last_child (cssnode))
gtk_css_node_set_after (last_node, gtk_css_node_get_last_child (cssnode));
- gtk_css_node_remove_class (last_node, GTK_STYLE_CLASS_LEFT);
- gtk_css_node_add_class (last_node, GTK_STYLE_CLASS_RIGHT);
}
#undef NOT_INHERITED
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 25322ab..3316b98 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -223,8 +223,8 @@ GtkTextView { // This will get overridden by .view, needed by gedit line numbers
padding: 5px 8px 6px;
&.image { // icons inside the entry
- &.left { padding-left: 0; }
- &.right { padding-right: 0; }
+ &:first-child { padding-left: 0; }
+ &:last-child { padding-right: 0; }
}
border-radius: 3px;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]