mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
InsetHFill drawing: some tweaks.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21984 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f1821946dc
commit
9536a8a651
@ -649,12 +649,13 @@ void TextMetrics::computeRowMetrics(pit_type const pit,
|
||||
InsetList::const_iterator iend = par.insetList().end();
|
||||
for ( ; ii != iend; ++ii) {
|
||||
if (ii->pos >= endpos || ii->pos < row.pos()
|
||||
|| ii->inset->lyxCode() != HFILL_CODE
|
||||
|| !pm.hfillExpansion(row, ii->pos))
|
||||
|| ii->inset->lyxCode() != HFILL_CODE)
|
||||
continue;
|
||||
|
||||
Dimension dim = row.dimension();
|
||||
dim.wid = int(ii->pos >= body_pos ? row.hfill : row.label_hfill);
|
||||
if (pm.hfillExpansion(row, ii->pos))
|
||||
dim.wid = int(ii->pos >= body_pos ? row.hfill : row.label_hfill);
|
||||
else
|
||||
dim.wid = 0;
|
||||
// Cache the inset dimension.
|
||||
bv_->coordCache().insets().add(ii->inset, dim);
|
||||
pm.setInsetDimension(ii->inset, dim);
|
||||
|
@ -64,7 +64,7 @@ void InsetHFill::draw(PainterInfo & pi, int x, int y) const
|
||||
// The HFill is not expanded.
|
||||
return;
|
||||
|
||||
int const x1 = x + dim.wid;
|
||||
int const x1 = x + dim.wid - 2;
|
||||
|
||||
pi.pain.line(x, y, x1, y, Color_added_space,
|
||||
frontend::Painter::line_onoffdash);
|
||||
|
Loading…
Reference in New Issue
Block a user