[gtk/wip/otte/reftests: 1/14] headerbar: Duct-tape over the measure mess
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/reftests: 1/14] headerbar: Duct-tape over the measure mess
- Date: Fri, 29 Mar 2019 04:53:45 +0000 (UTC)
commit 36ab70c9fb670231aa36dad6b5c53362ea0389bb
Author: Benjamin Otte <otte redhat com>
Date: Fri Mar 29 03:31:04 2019 +0100
headerbar: Duct-tape over the measure mess
Fixes various reftests.
The headerbar needs soeone to redo sizing.
gtk/gtkheaderbar.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkheaderbar.c b/gtk/gtkheaderbar.c
index 828250f653..70def4136f 100644
--- a/gtk/gtkheaderbar.c
+++ b/gtk/gtkheaderbar.c
@@ -884,12 +884,18 @@ gtk_header_bar_measure (GtkWidget *widget,
int *minimum_baseline,
int *natural_baseline)
{
+ int min, nat;
+ gtk_header_bar_get_size (widget, orientation, &min, &nat);
+
if (for_size < 0)
- gtk_header_bar_get_size (widget, orientation, minimum, natural);
+ *natural = nat;
else if (orientation == GTK_ORIENTATION_HORIZONTAL)
gtk_header_bar_compute_size_for_orientation (widget, for_size, minimum, natural);
else
gtk_header_bar_compute_size_for_opposing_orientation (widget, for_size, minimum, natural);
+
+ *minimum = MAX (*minimum, min);
+ *natural = MAX (*natural, min);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]