mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 02:14:50 +00:00
fix for Angus' redraw problem.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7317 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
359583859f
commit
b6eefddb85
@ -278,21 +278,21 @@ void InsetFormula::metrics(MetricsInfo & m, Dimension & dim) const
|
||||
{
|
||||
view_ = m.base.bv;
|
||||
if (preview_->previewReady()) {
|
||||
dim_.asc = preview_->pimage()->ascent();
|
||||
dim_.des = preview_->pimage()->descent();
|
||||
dim.asc = preview_->pimage()->ascent();
|
||||
dim.des = preview_->pimage()->descent();
|
||||
// insert a one pixel gap in front of the formula
|
||||
dim_.wid = 1 + preview_->pimage()->width();
|
||||
dim.wid = 1 + preview_->pimage()->width();
|
||||
if (display())
|
||||
dim_.des += 12;
|
||||
dim.des += 12;
|
||||
} else {
|
||||
MetricsInfo mi = m;
|
||||
mi.base.style = LM_ST_TEXT;
|
||||
mi.base.font.setColor(LColor::math);
|
||||
par()->metrics(mi, dim_);
|
||||
dim_.asc += 1;
|
||||
dim_.des += 1;
|
||||
dim.asc += 1;
|
||||
dim.des += 1;
|
||||
}
|
||||
dim = dim_;
|
||||
dim_ = dim;
|
||||
}
|
||||
|
||||
|
||||
|
@ -119,8 +119,6 @@ protected:
|
||||
mutable int xo_;
|
||||
///
|
||||
mutable int yo_;
|
||||
///
|
||||
mutable Dimension dim_;
|
||||
};
|
||||
|
||||
// We don't really mess want around with mathed stuff outside mathed.
|
||||
|
@ -178,15 +178,15 @@ void RowPainter::paintInset(pos_type const pos)
|
||||
|
||||
Assert(inset);
|
||||
|
||||
MetricsInfo mi(perv(bv_), getFont(pos), text_.workWidth());
|
||||
Dimension dim;
|
||||
inset->metrics(mi, dim);
|
||||
//MetricsInfo mi(perv(bv_), getFont(pos), text_.workWidth());
|
||||
//Dimension dim;
|
||||
//inset->metrics(mi, dim);
|
||||
|
||||
PainterInfo pi(perv(bv_));
|
||||
pi.base.font = getFont(pos);
|
||||
#warning metrics?
|
||||
inset->draw(pi, int(x_), yo_ + row_->baseline());
|
||||
x_ += dim.wid;
|
||||
x_ += inset->width();
|
||||
}
|
||||
|
||||
|
||||
@ -1014,7 +1014,7 @@ void RowPainter::paint()
|
||||
text_.prepareToPrint(row_, x_, separator_, hfill_, label_hfill_);
|
||||
|
||||
// FIXME: what is this fixing ?
|
||||
if (text_.isInInset() && (x_ < 0))
|
||||
if (text_.isInInset() && x_ < 0)
|
||||
x_ = 0;
|
||||
x_ += xo_;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user