space requirements :min-:max options

Bug #505930 reported by Christophe Rhodes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
McCLIM
Confirmed
Medium
Unassigned

Bug Description

Report from Clemens Fruhwirth

 affects mcclim
 status confirmed
 importance medium
 tag space-requirement layout
 done

According to the CLIM spec 29.3.1 Layout Pane Options:
"If either of the :max-height or :min-height options is not supplied,
it defaults to the value of the :height option."

However in panes.lisp, I see:

  ;; NOTE: The defaulting for :min-foo and :max-foo is different from MAKE-SPACE-REQUIREMENT.
  ;; MAKE-SPACE-REQUIREMENT has kind of &key foo (min-foo 0) (max-foo +fill+)
  ;; While user space requirements has &key foo (min-foo foo) (max-foo foo).
  ;; I as a user would pretty much expect the same behavior, therefore I'll take the
  ;; following route:
  ;; When the :foo option is given, I'll let MAKE-SPACE-REQUIREMENT decide.

May I urge you to change revert that change. The :height and :width
initargs loss their usefulness this way. Also it's a bit
counter-intutive. Look at

(define-application-frame only-red () ()
  (:pane
   (vertically ()
        (make-pane 'application-pane :background +red+ :min-height 100)
        +fill+
        (make-pane 'application-pane :background +blue+ :height 100))))

Wouldn't you expect to see two panes, one blue with height 100 and a red
one at least 100 pixel high?

The reason for this query is that I have troubles explaining the readers
of my CLIM tutorial why McCLIM violates the spec and why :height as well
as :width are mostly useless at the moment.

See panes.lisp "merge-one-option" (Line 549) and the commented code
  ;; (setf user-max-foo (or user-max-foo user-foo)
  ;; user-min-foo (or user-min-foo user-foo))

Thanks,

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.