From 198e37928a228c2106032c59a5e3ca189aecfafa Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Thu, 29 Sep 2011 18:37:22 -0700 Subject: [PATCH] Fixed a fix-resizer's verticality heuristic. --- src/gtk/fix-layout.scm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/gtk/fix-layout.scm b/src/gtk/fix-layout.scm index b55006d76..faf617fef 100644 --- a/src/gtk/fix-layout.scm +++ b/src/gtk/fix-layout.scm @@ -735,9 +735,14 @@ USA. (define-method initialize-instance ((widget ) width height) (call-next-method widget width height) (%trace "; (initialize-instance ) "widget" "width"x"height"\n") - (let ((vertical? (or (and (fix:< width 1) (fix:> height 0)) - (fix:< height width) - (error "Ambiguous verticality:" widget width height)))) + (let ((vertical? (let ((w (if (fix:< width 1) #f width)) + (h (if (fix:< height 1) #f height))) + (cond ((and w h (fix:> w h)) #t) + ((and w h (fix:< w h)) #f) + ((and (not w) h) #t) + ((and w (not h)) #f) + (else + (error "Ambiguous verticality:" w h widget)))))) (set-fix-resizer-stack-vertical?! widget vertical?))) (define-method fix-widget-realize-callback ((widget )) -- 2.25.1