int offset = coordOffset(dit).y_;
int ypos = pm.position() + offset;
Dimension const & row_dim =
- pm.getRow(cs.pos(), dit.boundary()).dimension();
+ pm.getRow(cs.pos(), dit.boundary()).dim();
int scrolled = 0;
if (recenter)
scrolled = scroll(ypos - height_/2);
d->anchor_pit_ = bot_pit;
CursorSlice const & cs = dit.innerTextSlice();
Dimension const & row_dim =
- pm.getRow(cs.pos(), dit.boundary()).dimension();
+ pm.getRow(cs.pos(), dit.boundary()).dim();
if (recenter)
d->anchor_ypos_ = height_/2;
// original value was 20px, which is 0.2in at 100dpi
int const margin = bv_->zoomedPixels(20);
if (pit == 0) {
- pm.rows().front().dimension().asc += margin;
+ pm.rows().front().dim().asc += margin;
/* coverity thinks that we should update pm.dim().asc
* below, but all the rows heights are actually counted as
* part of the paragraph metric descent see loop above).
}
ParagraphList const & pars = text_->paragraphs();
if (pit + 1 == pit_type(pars.size())) {
- pm.rows().back().dimension().des += margin;
+ pm.rows().back().dim().des += margin;
pm.dim().des += margin;
}
}
// The space above and below the paragraph.
int const top = parTopSpacing(pit);
- pm.rows().front().dimension().asc += top;
+ pm.rows().front().dim().asc += top;
int const bottom = parBottomSpacing(pit);
- pm.rows().back().dimension().des += bottom;
+ pm.rows().back().dim().des += bottom;
pm.dim().des += top + bottom;
pm.dim().asc += pm.rows()[0].ascent();
if (!row.setExtraWidth(w) && row.isRTL()) {
// Justification failed and the text is RTL: align to the right
row.left_margin += w;
- row.dimension().wid += w;
+ row.dim().wid += w;
}
break;
case LYX_ALIGN_LEFT:
// a displayed inset that is flushed
if (Inset const * inset = par.getInset(row.pos())) {
row.left_margin += inset->indent(*bv_);
- row.dimension().wid += inset->indent(*bv_);
+ row.dim().wid += inset->indent(*bv_);
}
break;
case LYX_ALIGN_RIGHT:
if (Inset const * inset = par.getInset(row.pos())) {
int const new_w = max(w - inset->indent(*bv_), 0);
row.left_margin += new_w;
- row.dimension().wid += new_w;
+ row.dim().wid += new_w;
} else {
row.left_margin += w;
- row.dimension().wid += w;
+ row.dim().wid += w;
}
break;
case LYX_ALIGN_CENTER:
- row.dimension().wid += w / 2;
+ row.dim().wid += w / 2;
row.left_margin += w / 2;
break;
case LYX_ALIGN_NONE:
// Case nh > 0. There are hfill separators.
hfill = w / nh;
hfill_rem = w % nh;
- row.dimension().wid += w;
+ row.dim().wid += w;
// Set size of hfill insets
pos_type const endpos = row.endpos();
pos_type body_pos = par.beginOfBody();
swap(row.left_margin, row.right_margin);
// Remember that the row width takes into account the left_margin
// but not the right_margin.
- row.dimension().wid = row.left_margin;
+ row.dim().wid = row.left_margin;
// the width available for the row.
int const width = max_width_ - row.right_margin;
// Add some leading (split between before and after)
int const leading = support::iround(extra_leading * (maxasc + maxdes));
- row.dimension().asc = int((maxasc + leading - leading / 2) * spacing_val);
- row.dimension().des = int((maxdes + leading / 2) * spacing_val);
+ row.dim().asc = int((maxasc + leading - leading / 2) * spacing_val);
+ row.dim().des = int((maxdes + leading / 2) * spacing_val);
}
row.pos(wordStart.pos());
row.endpos(bvcur.pos());
setRowHeight(row);
- dim = row.dimension();
+ dim = row.dim();
// get position on screen of the word start and end
//FIXME: Is it necessary to explicitly set this to false?