Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Daniel Kochmański
Daniel Kochmański
@jackdaniel@functional.cafe  ·  activity timestamp 2 weeks ago

I wrote a thing, I wrote a thing!

https://turtleware.eu/posts/McCLIM-and-7GUIs---Part-1-The-Counter.html

This tutorial will be included in McCLIM manual (and other parts too).

#mcclim #lisp

TurtleWare

  • Copy link
  • Flag this post
  • Block
Paolo Amoroso
Paolo Amoroso
@amoroso@oldbytes.space replied  ·  activity timestamp 2 weeks ago

@jackdaniel In the layout of the second example of version 1 why do you insert a label pane between the text field and the button? Wouldn't +fill+ or similar do?

  • Copy link
  • Flag this comment
  • Block
Daniel Kochmański
Daniel Kochmański
@jackdaniel@functional.cafe replied  ·  activity timestamp 2 weeks ago

@amoroso it is a kludge and a mistake.

Originally I have wanted to put there a spacing pane:

(horizontally ()
(100
(bordering (:thickness 1 :background +black+)
(spacing (:thickness 4 :background +white+) tfield)))
(spacing (:thickness 15))
(100 button))

but spacing pane implementation expects to have a child (signals an error). This is under-specified whether spacing pane can have 0 children, but I find it to be the most appropriate pane for specifying additional space (with more initargs that would allow specifying left, right, top and bottom margins separately when deemed necessary).

As a substitute I've picked an empty label pane that works with and without children (there are small issues with positioning, so it could use some work).

All that said, I could have just put there 15, and that would have worked equally well, because the macro horizontally accepts numbers (and a symbol +fill+) as contents forms. So it should be simply:

(horizontally ()
(100
(bordering (:thickness 1 :background +black+)
(spacing (:thickness 4 :background +white+) tfield)))
15
(100 button))

I didn't want to put there +fill+, because:

- then it would be possible to resize the pane
- there wouldn't be initial space between gadgets

and it looks rather good with the space of exact size 15 (given both have 100).

Thanks for bringing this up, I'll update the post to put them just 15.

  • Copy link
  • Flag this comment
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.2-alpha.22 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct