From: Matt Birkholz Date: Fri, 30 Sep 2011 01:37:22 +0000 (-0700) Subject: Fixed a fix-resizer's verticality heuristic. X-Git-Tag: mit-scheme-pucked-9.2.12~603 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=198e37928a228c2106032c59a5e3ca189aecfafa;p=mit-scheme.git Fixed a fix-resizer's verticality heuristic. --- 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 ))