[gtk/wip/otte/for-master: 7/8] entry: Keep widget order
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/for-master: 7/8] entry: Keep widget order
- Date: Tue, 20 Oct 2020 02:23:57 +0000 (UTC)
commit c72ef0986ffee6eb54fe42b9e196f3ff01836cfb
Author: Benjamin Otte <otte redhat com>
Date: Tue Oct 20 04:05:52 2020 +0200
entry: Keep widget order
... instead of just ordering the CSS nodes.
gtk/gtkentry.c | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 3717dcea2a..b5ebbe2b14 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -36,7 +36,6 @@
#include "gtkbutton.h"
#include "gtkcelleditable.h"
#include "gtkcelllayout.h"
-#include "gtkcssnodeprivate.h"
#include "gtkdebug.h"
#include "gtkeditable.h"
#include "gtkemojichooser.h"
@@ -1509,14 +1508,9 @@ update_node_ordering (GtkEntry *entry)
GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry);
EntryIconInfo *icon_info;
GtkEntryIconPosition first_icon_pos, second_icon_pos;
- GtkCssNode *parent;
if (priv->progress_widget)
- {
- gtk_css_node_insert_before (gtk_widget_get_css_node (GTK_WIDGET (entry)),
- gtk_widget_get_css_node (priv->progress_widget),
- NULL);
- }
+ gtk_widget_insert_before (priv->progress_widget, GTK_WIDGET (entry), NULL);
if (gtk_widget_get_direction (GTK_WIDGET (entry)) == GTK_TEXT_DIR_RTL)
{
@@ -1529,15 +1523,13 @@ update_node_ordering (GtkEntry *entry)
second_icon_pos = GTK_ENTRY_ICON_SECONDARY;
}
- parent = gtk_widget_get_css_node (GTK_WIDGET (entry));
-
icon_info = priv->icons[first_icon_pos];
if (icon_info)
- gtk_css_node_insert_after (parent, gtk_widget_get_css_node (icon_info->widget), NULL);
+ gtk_widget_insert_after (icon_info->widget, GTK_WIDGET (entry), NULL);
icon_info = priv->icons[second_icon_pos];
if (icon_info)
- gtk_css_node_insert_before (parent, gtk_widget_get_css_node (icon_info->widget), NULL);
+ gtk_widget_insert_before (icon_info->widget, GTK_WIDGET (entry), NULL);
}
static GtkEntryIconPosition
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]