]> git.lyx.org Git - features.git/commitdiff
Blueline-under-insets fix
authorMartin Vermeer <martin.vermeer@hut.fi>
Fri, 3 Feb 2006 17:21:51 +0000 (17:21 +0000)
committerMartin Vermeer <martin.vermeer@hut.fi>
Fri, 3 Feb 2006 17:21:51 +0000 (17:21 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10805 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/rowpainter.C

index ce29a6ce913e9e3b9743b0e660062aadc46ce483..5c1dcb898896b7e04f754c316baf0048f5c766bb 100644 (file)
@@ -1,3 +1,8 @@
+2006-02-03  Martin Vermeer  <martin.vermeer@hut.fi>
+
+       * rowpainter.C (paintForeignMark): fix foreign blue line under
+       insets
+
 2006-01-30  Jürgen Spitzmüller  <j.spitzmueller@gmx.de>
 
        * * text2.C (deleteEmptyParagraphMechanism): fix off-by-one error of the start 
index b992b00143a71425bccc3eff85218e728ef80add..405914173ab491ab98dc2a9a5a09bf66525c8212 100644 (file)
@@ -71,7 +71,7 @@ public:
        void paintText();
 
 private:
-       void paintForeignMark(double orig_x, LyXFont const & font);
+       void paintForeignMark(double orig_x, LyXFont const & font, int desc = 0);
        void paintHebrewComposeChar(lyx::pos_type & vpos, LyXFont const & font);
        void paintArabicComposeChar(lyx::pos_type & vpos, LyXFont const & font);
        void paintChars(lyx::pos_type & vpos, LyXFont font, 
@@ -288,7 +288,7 @@ void RowPainter::paintChars(pos_type & vpos, LyXFont font,
 }
 
 
-void RowPainter::paintForeignMark(double orig_x, LyXFont const & font)
+void RowPainter::paintForeignMark(double orig_x, LyXFont const & font, int desc)
 {
        if (!lyxrc.mark_foreign_language)
                return;
@@ -297,7 +297,7 @@ void RowPainter::paintForeignMark(double orig_x, LyXFont const & font)
        if (font.language() == bv_.buffer()->params().language)
                return;
 
-       int const y = yo_ + 1;
+       int const y = yo_ + 1 + desc;
        pain_.line(int(orig_x), y, int(x_), y, LColor::language);
 }
 
@@ -313,7 +313,8 @@ void RowPainter::paintFromPos(pos_type & vpos)
        if (par_.isInset(pos)) {
                paintInset(pos, orig_font);
                ++vpos;
-               paintForeignMark(orig_x, orig_font);
+               paintForeignMark(orig_x, orig_font,
+                       par_.getInset(pos)->descent());
                return;
        }