All other files: adapt to above change.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20177
a592a061-630c-0410-9148-
cb99ea01b6c8
LYXERR(Debug::PAINTING) << "\t\t*** START DRAWING ***" << endl;
Text & text = buffer_.text();
TextMetrics const & tm = text_metrics_[&text];
LYXERR(Debug::PAINTING) << "\t\t*** START DRAWING ***" << endl;
Text & text = buffer_.text();
TextMetrics const & tm = text_metrics_[&text];
+ int y = metrics_info_.y1 + tm.parMetrics(metrics_info_.p1).ascent();
- tm.drawParagraph(pi, metrics_info_.p1, 0,
- metrics_info_.y1 + tm.parMetrics(metrics_info_.p1).ascent());
+ tm.drawParagraph(pi, metrics_info_.p1, 0, y);
- tm.draw(pi, 0, metrics_info_.y1);
LYXERR(Debug::PAINTING) << "\n\t\t*** END DRAWING ***" << endl;
// and grey out above (should not happen later)
LYXERR(Debug::PAINTING) << "\n\t\t*** END DRAWING ***" << endl;
// and grey out above (should not happen later)
ParMetricsCache::const_iterator it = par_metrics_.begin();
ParMetricsCache::const_iterator const pm_end = par_metrics_.end();
ParMetricsCache::const_iterator it = par_metrics_.begin();
ParMetricsCache::const_iterator const pm_end = par_metrics_.end();
+ y -= it->second.ascent();
for (; it != pm_end; ++it) {
ParagraphMetrics const & pmi = it->second;
y += pmi.ascent();
for (; it != pm_end; ++it) {
ParagraphMetrics const & pmi = it->second;
y += pmi.ascent();
labelwidth_ = pi.pain.text(x, y, full_label_, pi.base.font);
// add some space to separate the label from the inset text
labelwidth_ += 2 * TEXT_TO_INSET_OFFSET;
labelwidth_ = pi.pain.text(x, y, full_label_, pi.base.font);
// add some space to separate the label from the inset text
labelwidth_ += 2 * TEXT_TO_INSET_OFFSET;
- int const ty = y - ascent() + TEXT_TO_INSET_OFFSET;
- InsetText::draw(pi, x + labelwidth_, ty);
+ InsetText::draw(pi, x + labelwidth_, y);
- TextMetrics const & tm = pi.base.bv->textMetrics(&text_);
- int const baseline = y - tm.ascent();
+ int const baseline = y;
int textx, texty;
switch (geometry()) {
case LeftButton:
int textx, texty;
switch (geometry()) {
case LeftButton:
int const a = tabular.rowAscent(i);
int const d = tabular.rowDescent(i);
idx = tabular.cellIndex(i, 0);
int const a = tabular.rowAscent(i);
int const d = tabular.rowDescent(i);
idx = tabular.cellIndex(i, 0);
for (col_type j = 0; j < tabular.columnCount(); ++j) {
if (tabular.isPartOfMultiColumn(i, j))
continue;
for (col_type j = 0; j < tabular.columnCount(); ++j) {
if (tabular.isPartOfMultiColumn(i, j))
continue;
|| y + d < 0
|| y - a > bv->workHeight()) {
pi.pain.setDrawingEnabled(false);
|| y + d < 0
|| y - a > bv->workHeight()) {
pi.pain.setDrawingEnabled(false);
- cell(idx)->draw(pi, cx, cy);
+ cell(idx)->draw(pi, cx, y);
drawCellLines(pi.pain, nx, y, i, idx, pi.erased_);
pi.pain.setDrawingEnabled(true);
} else {
drawCellLines(pi.pain, nx, y, i, idx, pi.erased_);
pi.pain.setDrawingEnabled(true);
} else {
- cell(idx)->draw(pi, cx, cy);
+ cell(idx)->draw(pi, cx, y);
drawCellLines(pi.pain, nx, y, i, idx, pi.erased_);
}
nx += tabular.columnWidth(idx);
drawCellLines(pi.pain, nx, y, i, idx, pi.erased_);
}
nx += tabular.columnWidth(idx);
int const a = border_;
int const h = a + tm.height() + border_;
if (pi.full_repaint)
int const a = border_;
int const h = a + tm.height() + border_;
if (pi.full_repaint)
- pi.pain.fillRectangle(x, y - a, w, h, backgroundColor());
+ pi.pain.fillRectangle(x, y - a - tm.ascent(), w, h, backgroundColor());
- pi.pain.rectangle(x, y - a, w, h, frameColor());
+ pi.pain.rectangle(x, y - a - tm.ascent(), w, h, frameColor());
}
tm.draw(pi, x + border_, y);
}
}
tm.draw(pi, x + border_, y);
}