[gtk+/wip/baedert/drawing: 340/348] box: Ignore baselines when vertical



commit 8893239e84ea13860a0c146a818f0dfe05860236
Author: Timm Bäder <mail baedert org>
Date:   Wed Jul 5 11:09:27 2017 +0200

    box: Ignore baselines when vertical
    
    For now.

 gtk/gtkbox.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkbox.c b/gtk/gtkbox.c
index d71aa48..1db4d9b 100644
--- a/gtk/gtkbox.c
+++ b/gtk/gtkbox.c
@@ -385,7 +385,7 @@ gtk_box_size_allocate_no_center (GtkWidget           *widget,
   gint minimum_above, natural_above;
   gint minimum_below, natural_below;
   gboolean have_baseline;
-  gint baseline;
+  int baseline = -1;
 
   GtkPackType packing;
 
@@ -521,8 +521,7 @@ gtk_box_size_allocate_no_center (GtkWidget           *widget,
 
          sizes[i].natural_size = child_size;
 
-         if (private->orientation == GTK_ORIENTATION_HORIZONTAL &&
-             gtk_widget_get_valign (child->widget) == GTK_ALIGN_BASELINE)
+         if (private->orientation == GTK_ORIENTATION_HORIZONTAL)
            {
              int child_allocation_width;
              int child_minimum_height, child_natural_height;
@@ -550,7 +549,9 @@ gtk_box_size_allocate_no_center (GtkWidget           *widget,
        }
     }
 
-  baseline = gtk_widget_get_allocated_baseline (widget);
+  if (private->orientation == GTK_ORIENTATION_HORIZONTAL)
+    baseline = gtk_widget_get_allocated_baseline (widget);
+
   if (baseline == -1 && have_baseline)
     {
       gint height = MAX (1, allocation->height);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]