Re: form input button and margin

"Sebastian Geerken" <[email protected]>
Newsgroups gmane.comp.web.dillo.devel
Message-ID <[email protected]>
On Sun, Feb 02, corvid wrote:
> I wrote:
> > In the second one, the words and the button overlap. I'm not immediately
> > sure what's special enough about that case to cause that.
> 
> Here's some quick code made by looking at how the image code is working.
> I would not be surprised if there are still complications lurking
> somewhere in textblock, but it's at least something to play with...

First of all, two remarks: (i) the border should also be added in
getExtremesImpl; (ii) Embed::draw should either work similar to
Image::draw (testing for intersection), or as currently, which is
probably preferrably, since simpler, and drawing only some pixels more
than needed.
 
> Aside: It seems that, at least for firefox, the border is the edge of a
> button or text entry widget or whatever, and padding goes inside that.
> Of course we're not in any position to do that, but it's interesting.

I do not have specs at hand, but I assume that this is correct.

For this reason, I'd rather let the resource, not the embed widget,
handle border and padding. For a first version, the standard borders
(outset for button, inset for input fields, etc.) could be drawn; for
an improvement, custom Fltk widgets would be neccessary.

For reasons of uniformity, I'd let the resource als handle margin,
which should then be implemented somewhere in flkt::ui.

BTW: Johannes and I are planning to cleanup size handling; I'd like to
get rid of size hints, and so also of the distinction "uses size
hints". This will make it simpler to add <button>'s inline.

Sebastian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.