]> git.lyx.org Git - features.git/commitdiff
Fix bug #953: Paint text decorations for spaces
authorVincent van Ravesteijn <vfr@lyx.org>
Wed, 2 May 2012 16:02:52 +0000 (18:02 +0200)
committerVincent van Ravesteijn <vfr@lyx.org>
Sun, 6 May 2012 15:23:23 +0000 (17:23 +0200)
(cherry picked from commit c671703f05a74e5b005666c29aff2626931cb239)

src/rowpainter.cpp
src/rowpainter.h
status.20x

index fb14008434b536fd0e3bc9136611de4a8849ec45..0ee4280d127b647b2ef89675d108164b93481689 100644 (file)
@@ -360,6 +360,14 @@ void RowPainter::paintChars(pos_type & vpos, FontInfo const & font,
 }
 
 
+void RowPainter::paintSeparator(double orig_x, double width,
+       FontInfo const & font)
+{
+       pi_.pain.textDecoration(font, int(orig_x), yo_, int(width));
+       x_ += width;
+}
+
+
 void RowPainter::paintForeignMark(double orig_x, Language const * lang,
                int desc)
 {
@@ -922,9 +930,10 @@ void RowPainter::paintText()
                if (par_.isSeparator(pos)) {
                        Font const orig_font = text_metrics_.displayFont(pit_, pos);
                        double const orig_x = x_;
-                       x_ += width_pos;
+                       double separator_width = width_pos;
                        if (pos >= body_pos)
-                               x_ += row_.separator;
+                               separator_width += row_.separator;
+                       paintSeparator(orig_x, separator_width, orig_font.fontInfo());
                        paintForeignMark(orig_x, orig_font.language());
                        ++vpos;
 
index 6408fdc73fb33ac0b9dea21807af71f3686aa27b..d654bf20cd1415a07adec9500872436d3defb9ed 100644 (file)
@@ -58,6 +58,7 @@ public:
        void paintSelection();
 
 private:
+       void paintSeparator(double orig_x, double width, FontInfo const & font);
        void paintForeignMark(double orig_x, Language const * lang, int desc = 0);
        void paintMisspelledMark(double orig_x, bool changed);
        void paintHebrewComposeChar(pos_type & vpos, FontInfo const & font);
index 28af6114f6fb492fcb93634f19bee0312f9276c9..3fec63669b047f64fb7284998cecfa8b62879701 100644 (file)
@@ -170,6 +170,8 @@ What's new
 - Fix display of special characters like '\#', '{..}' and of auto-
   completion in math insets with a special font, e.g. mathcal (bug 5167).
 
+- Fix the painting of underbar and strikeout which span spaces (bug 953).
+
 
 * DOCUMENTATION AND LOCALIZATION