]> 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>
Wed, 2 May 2012 16:02:52 +0000 (18:02 +0200)
src/rowpainter.cpp
src/rowpainter.h

index a9f8352df0fe2ad96cfdeb19cf120a94b0b5ae3e..c33bd799174cc6c1896366ed2aada6ed6a2a6125 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)
 {
@@ -937,9 +945,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 7a43ef774f077b9b4b7dd6a5ec8386ba5459f985..480a2dd56c58a946e7fe99626795e1edc5131ed5 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);