Lisp HUG Maillist Archive

pinboard-layout highlight :invert and item-pinboard-objects with background colors error

Hi all,
Does anyone know why I get this bad interaction between a
pinboard-layout with :highlight :invert and an item-pinboard-object
with a :background <color> in its graphics-args?  I don't see anything
in the docs on highlight-pinboard object to suggest that this is
prohibited.  I'm on LWM 5.1.2 Intel.

(let* ((plain-item (make-instance 'capi:item-pinboard-object
                                  :text "Plain Item"
                                  :y 0))
       (color-item (make-instance 'capi:item-pinboard-object
                                  :text "Color Item"
                                  :y 20
                                  :graphics-args (list :foreground :blue)))
       (fancy-item (make-instance 'capi:item-pinboard-object
                                  :y 40
                                  :text "Fancy Item"
                                  :graphics-args (list :foreground :blue
                                                       :background :yellow)))
       (pinboard (capi:contain (make-instance
                                'capi:pinboard-layout
                                :highlight-style :invert
                                :description (list plain-item
                                                   color-item
                                                   fancy-item)))))
  ;; first item inverts properly...
  (sleep 1)
  (capi:highlight-pinboard-object pinboard plain-item)
  (capi:redraw-pinboard-object plain-item t)
  ;; as does the second one...
  (sleep 1)
  (capi:highlight-pinboard-object pinboard color-item)
  (capi:redraw-pinboard-object color-item t)
  ;; but the third one signals an error: in ROUND of (NIL 1) arguments
  ;; should be of type REAL
  (sleep 1)
  (capi:highlight-pinboard-object pinboard fancy-item)
  (capi:redraw-pinboard-object fancy-item t))

Thanks in advance,
//JT


Updated at: 2020-12-10 08:40 UTC