From 6fef639091d39cc978f8cad992407186714de1af Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Thu, 6 Dec 2007 08:51:56 +0000 Subject: [PATCH 1/1] * 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 --- src/TextMetrics.cpp | 5 +++-- src/insets/InsetHFill.cpp | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp index 4adffdcdd8..8321b34eca 100644 --- a/src/TextMetrics.cpp +++ b/src/TextMetrics.cpp @@ -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); diff --git a/src/insets/InsetHFill.cpp b/src/insets/InsetHFill.cpp index cc02b0b6c8..d5e39ce3c5 100644 --- a/src/insets/InsetHFill.cpp +++ b/src/insets/InsetHFill.cpp @@ -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, -- 2.39.2