On Fri, 2006-02-03 at 11:28 +0100, Georg Baum wrote: > Martin Vermeer wrote:
... > > I did. Quotes etc. indeed do not get underlined with my patch. So it is > > wrong. A solution might be to give paintForeignMark an additional > > "descent" parameter and use that to put the line at the right level. > > Yes, but how do we determine the value of this parameter? We basically need > a list of insets that need the blue line at the bottom -> huge switch or > virtual method, or do you see any other possibility? This is an independent problem, for which an independent, simple patch is attached. Works for all the insets I could throw at it... but tell me if I overlooked something. Should be unproblematic and fixes a regression. Jean-Marc? - Martin
Index: rowpainter.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/rowpainter.C,v retrieving revision 1.163 diff -u -p -r1.163 rowpainter.C --- rowpainter.C 16 Jan 2006 15:17:17 -0000 1.163 +++ rowpainter.C 3 Feb 2006 15:17:05 -0000 @@ -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 = 1); 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 +290,7 @@ void RowPainter::paintChars(pos_type & v } -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 +299,7 @@ void RowPainter::paintForeignMark(double if (font.language() == bv_.buffer()->params().language) return; - int const y = yo_ + 1; + int const y = yo_ + desc; pain_.line(int(orig_x), y, int(x_), y, LColor::language); } Index: rowpainter.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/rowpainter.C,v retrieving revision 1.163 diff -u -p -r1.163 rowpainter.C --- rowpainter.C 16 Jan 2006 15:17:17 -0000 1.163 +++ rowpainter.C 3 Feb 2006 15:24:49 -0000 @@ -313,7 +315,8 @@ void RowPainter::paintFromPos(pos_type & if (par_.isInset(pos)) { paintInset(pos, orig_font); ++vpos; - paintForeignMark(orig_x, orig_font); + paintForeignMark(orig_x, orig_font, + par_.getInset(pos)->descent() + 2); return; }
signature.asc
Description: This is a digitally signed message part