]> git.lyx.org Git - features.git/commit
Remove space between button and text with inlines collapsible insets
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sun, 11 Dec 2022 19:59:43 +0000 (20:59 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 6 Feb 2023 19:28:37 +0000 (20:28 +0100)
commit04ece4f0d6af818b3bc572b558181b947a109580
tree519a8bc8f0435300c89dbd333af0ba4fa7b222d2
parentfb37682d7454f2679d01235ad51912fe11d6caa6
Remove space between button and text with inlines collapsible insets

Typically there are two sources of spacing:
* the button has two pixels added to the left and to the right
* the frame around the text also has 2 pixels to the left and to the right

Note that this value of two pixels is given here for simplicity, but
these are parameterized by methods like textOffset or leftOffset.

What we want to remove is the space after the button and the space
before the frame. This is done in 3 places

In dimensionCollapsed(), the extra space is removed from the dimension
after its computation

In metrics(), the space avoided before the frame is removed from width.

In draw, the whome text inset is drawn with a negative offset.

Fixes #12335.
src/insets/InsetCollapsible.cpp