[nautilus/wip/antoniof/gtk4-preparation-miscellaneous: 11/15] general: Stop using the state argument of GtkStyleContext getters
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/gtk4-preparation-miscellaneous: 11/15] general: Stop using the state argument of GtkStyleContext getters
- Date: Fri, 12 Nov 2021 01:41:11 +0000 (UTC)
commit 71c96cd31a2c5142f653abf987ce3f12f810de08
Author: António Fernandes <antoniof gnome org>
Date: Sun Feb 14 14:40:45 2021 +0000
general: Stop using the state argument of GtkStyleContext getters
As per
https://docs.gtk.org/gtk4/migrating-3to4.html#stop-using-the-state-argument-of-gtkstylecontext-getters
src/nautilus-container-max-width.c | 4 ++--
src/nautilus-floating-bar.c | 2 +-
src/nautilus-toolbar.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/nautilus-container-max-width.c b/src/nautilus-container-max-width.c
index ef6fb8792..589068c81 100644
--- a/src/nautilus-container-max-width.c
+++ b/src/nautilus-container-max-width.c
@@ -141,7 +141,7 @@ get_preferred_width (GtkWidget *widget,
style_context = gtk_widget_get_style_context (widget);
gtk_style_context_get_padding (style_context,
- gtk_widget_get_state_flags (widget),
+ gtk_style_context_get_state (style_context),
&padding);
*minimum_size += padding.left + padding.right;
*natural_size += padding.left + padding.right;
@@ -169,7 +169,7 @@ get_preferred_height (GtkWidget *widget,
style_context = gtk_widget_get_style_context (widget);
gtk_style_context_get_padding (style_context,
- gtk_widget_get_state_flags (widget),
+ gtk_style_context_get_state (style_context),
&padding);
*minimum_size += padding.top + padding.bottom;
*natural_size += padding.top + padding.bottom;
diff --git a/src/nautilus-floating-bar.c b/src/nautilus-floating-bar.c
index fdb76fb95..1cac4dc43 100644
--- a/src/nautilus-floating-bar.c
+++ b/src/nautilus-floating-bar.c
@@ -304,7 +304,7 @@ get_padding_and_border (GtkWidget *widget,
GtkBorder tmp;
context = gtk_widget_get_style_context (widget);
- state = gtk_widget_get_state_flags (widget);
+ state = gtk_style_context_get_state (context);
gtk_style_context_get_padding (context, state, border);
gtk_style_context_get_border (context, state, &tmp);
diff --git a/src/nautilus-toolbar.c b/src/nautilus-toolbar.c
index dc5574a07..b52920853 100644
--- a/src/nautilus-toolbar.c
+++ b/src/nautilus-toolbar.c
@@ -687,7 +687,7 @@ on_operations_icon_draw (GtkWidget *widget,
GtkStyleContext *style_context;
style_context = gtk_widget_get_style_context (widget);
- gtk_style_context_get_color (style_context, gtk_widget_get_state_flags (widget), &foreground);
+ gtk_style_context_get_color (style_context, gtk_style_context_get_state (style_context), &foreground);
background = foreground;
background.alpha *= 0.3;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]