mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
* InsetHFill: small drawing tweaks and fix the cursor positionning and selection of the inset.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21988 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
eb96d94ce7
commit
6fef639091
@ -651,9 +651,10 @@ void TextMetrics::computeRowMetrics(pit_type const pit,
|
||||
continue;
|
||||
Dimension dim = row.dimension();
|
||||
if (pm.hfillExpansion(row, ii->pos))
|
||||
dim.wid = int(ii->pos >= body_pos ? hfill : row.label_hfill);
|
||||
dim.wid = int(ii->pos >= body_pos ?
|
||||
max(hfill, 5.0) : row.label_hfill);
|
||||
else
|
||||
dim.wid = 3;
|
||||
dim.wid = 5;
|
||||
// Cache the inset dimension.
|
||||
bv_->coordCache().insets().add(ii->inset, dim);
|
||||
pm.setInsetDimension(ii->inset, dim);
|
||||
|
@ -56,8 +56,8 @@ void InsetHFill::draw(PainterInfo & pi, int x, int y) const
|
||||
Dimension const dim = Inset::dimension(*pi.base.bv);
|
||||
int const x0 = x + 1;
|
||||
int const x1 = x + dim.wid - 2;
|
||||
int const y0 = y + dim.des;
|
||||
int const y1 = y - dim.asc;
|
||||
int const y0 = y + dim.des - 1;
|
||||
int const y1 = y - dim.asc + 1;
|
||||
|
||||
pi.pain.line(x0, y1, x0, y0, Color_added_space);
|
||||
pi.pain.line(x0, y, x1, y, Color_added_space,
|
||||
|
Loading…
Reference in New Issue
Block a user