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:
Abdelrazak Younes 2007-12-05 22:47:14 +00:00
parent f1821946dc
commit 9536a8a651
2 changed files with 6 additions and 5 deletions

View File

@ -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);

View File

@ -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);