]> git.lyx.org Git - lyx.git/commitdiff
* InsetHFill: small drawing tweaks and fix the cursor positionning and selection...
authorAbdelrazak Younes <younes@lyx.org>
Thu, 6 Dec 2007 08:51:56 +0000 (08:51 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Thu, 6 Dec 2007 08:51:56 +0000 (08:51 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21988 a592a061-630c-0410-9148-cb99ea01b6c8

src/TextMetrics.cpp
src/insets/InsetHFill.cpp

index 4adffdcdd8078e38fb9dfe0012bbb54271876e09..8321b34ecadd030585ea06824e13f3dbfafbeb6b 100644 (file)
@@ -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);
index cc02b0b6c81fcb246e50f34ec7bfe4b0fd222754..d5e39ce3c51237c738e399aacaca93778ef5f083 100644 (file)
@@ -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,