Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

formatting-cell: min-width/min-height does not change the cell size #1326

Open
dkochmanski opened this issue Dec 28, 2022 · 0 comments
Open
Labels

Comments

@dkochmanski
Copy link
Member

It affects the layout, so when we don't draw the border that is not visible. However when we have a border and min-width/min-height then it becomes problematic. In the code below the first table looks innocent, but in the second table the problem becomes obvious.

(in-package #:clim-user)

(define-border-type :right-separator (stream top bottom right)
  (draw-line* stream right top right bottom))

(with-output-to-drawing-stream (*standard-output* nil nil)
  (sleep .1)
  (formatting-table (t :x-spacing 0 :y-spacing 0)
    (loop for row from 0 upto 9 do
      (formatting-row ()
        (loop for col from 0 upto 9 do
          (surrounding-output-with-border (t :padding 0 :shape :right-separator)
            (formatting-cell (t :min-width 50)
              (format t "~s x ~s" row col)))))))
  (terpri)
  (formatting-table (t :x-spacing 0 :y-spacing 0)
    (loop for row from 0 upto 9 do
      (formatting-row ()
        (loop for col from 0 upto 9 do
          (surrounding-output-with-border (t :padding 0 :shape :right-separator)
            (formatting-cell (t :min-width 50 :min-height 25)
              (format t "~s x ~s" row col))))))))

borders

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant