From cf27d693d8108b490d90fabe344d9170db360fc6 Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Wed, 2 May 2012 18:02:52 +0200 Subject: [PATCH] Fix bug #953: Paint text decorations for spaces (cherry picked from commit c671703f05a74e5b005666c29aff2626931cb239) --- src/rowpainter.cpp | 13 +++++++++++-- src/rowpainter.h | 1 + status.20x | 2 ++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/rowpainter.cpp b/src/rowpainter.cpp index fb14008434..0ee4280d12 100644 --- a/src/rowpainter.cpp +++ b/src/rowpainter.cpp @@ -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; diff --git a/src/rowpainter.h b/src/rowpainter.h index 6408fdc73f..d654bf20cd 100644 --- a/src/rowpainter.h +++ b/src/rowpainter.h @@ -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); diff --git a/status.20x b/status.20x index 28af6114f6..3fec63669b 100644 --- a/status.20x +++ b/status.20x @@ -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 -- 2.39.5