mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Properly adjust space after collapsable inset (the (int) cast there was applied to 1.5 only).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17082 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
5402048cea
commit
e2c8e359c0
@ -152,7 +152,7 @@ Dimension InsetCollapsable::dimensionCollapsed() const
|
||||
bool InsetCollapsable::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
{
|
||||
autoOpen_ = mi.base.bv->cursor().isInside(this);
|
||||
mi.base.textwidth -= (int) 1.5 * TEXT_TO_INSET_OFFSET;
|
||||
mi.base.textwidth -= (int) (1.5 * TEXT_TO_INSET_OFFSET);
|
||||
|
||||
if (status() == Inlined) {
|
||||
InsetText::metrics(mi, dim);
|
||||
@ -178,8 +178,8 @@ bool InsetCollapsable::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
}
|
||||
dim.asc += TEXT_TO_INSET_OFFSET;
|
||||
dim.des += TEXT_TO_INSET_OFFSET;
|
||||
dim.wid += (int) 1.5 * TEXT_TO_INSET_OFFSET;
|
||||
mi.base.textwidth += (int) 1.5 * TEXT_TO_INSET_OFFSET;
|
||||
dim.wid += (int) (1.5 * TEXT_TO_INSET_OFFSET);
|
||||
mi.base.textwidth += (int) (1.5 * TEXT_TO_INSET_OFFSET);
|
||||
bool const changed = dim_ != dim;
|
||||
dim_ = dim;
|
||||
return changed;
|
||||
|
Loading…
Reference in New Issue
Block a user