[gtk/wip/otte/for-master] spinner: Behave like any other icon
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/for-master] spinner: Behave like any other icon
- Date: Thu, 17 Jun 2021 10:55:40 +0000 (UTC)
commit e6c4dbfc6db03642cf76c2fcc83ed3cc749da6e0
Author: Benjamin Otte <otte redhat com>
Date: Thu Jun 17 12:53:01 2021 +0200
spinner: Behave like any other icon
Take the size from -gtk-icon-size.
Note that min-width/height still works, as those properties are handled
by the generic widget sizing machinery in GTK4.
gtk/gtkspinner.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
---
diff --git a/gtk/gtkspinner.c b/gtk/gtkspinner.c
index 0c21c0c5ef..163911552d 100644
--- a/gtk/gtkspinner.c
+++ b/gtk/gtkspinner.c
@@ -91,20 +91,10 @@ gtk_spinner_measure (GtkWidget *widget,
int *minimum_baseline,
int *natural_baseline)
{
- double min_size;
GtkCssStyle *style;
style = gtk_css_node_get_style (gtk_widget_get_css_node (widget));
-
- if (orientation == GTK_ORIENTATION_HORIZONTAL)
- min_size = _gtk_css_number_value_get (style->size->min_width, 100);
- else
- min_size = _gtk_css_number_value_get (style->size->min_height, 100);
-
- if (min_size > 0.0)
- *minimum = *natural = min_size;
- else
- *minimum = *natural = DEFAULT_SIZE;
+ *minimum = *natural = _gtk_css_number_value_get (style->icon->icon_size, 100);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]