]> git.lyx.org Git - lyx.git/blobdiff - src/rowpainter.cpp
Fix tab order for crossref dialog.
[lyx.git] / src / rowpainter.cpp
index 21c1d9d3fccb6657b1d59af1c06aa36dfed64a25..bcbf6da6fbbb2c4500c90f351b2a01d7dc2025cd 100644 (file)
@@ -125,11 +125,8 @@ void RowPainter::paintInset(Inset const * inset, pos_type const pos)
        // requires a full repaint
        bool pi_full_repaint = pi_.full_repaint;
 
-       // FIXME: We should always use font, see documentation of
-       // noFontChange() in Inset.h.
-       pi_.base.font = inset->noFontChange() ?
-               pi_.base.bv->buffer().params().getFont().fontInfo() :
-               font.fontInfo();
+       pi_.base.font = inset->inheritFont() ? font.fontInfo() :
+               pi_.base.bv->buffer().params().getFont().fontInfo();
        pi_.ltr_pos = (bidi_.level(pos) % 2 == 0);
        pi_.change_ = change_.changed() ? change_ : par_.lookupChange(pos);
 
@@ -270,9 +267,9 @@ void RowPainter::paintChars(pos_type & vpos, FontInfo const & font,
                // Maybe a more general fix would be draw character by character
                // for some predefined fonts on some platform. In arabic and
                // Hebrew we already do paint this way.
-               if (prev_char == 'f')
+               if (prev_char == 'f' || lyxrc.force_paint_single_char)
                        break;
-               
+
                pos = bidi_.vis2log(vpos);
                if (pos < font_span.first || pos > font_span.last)
                        break;
@@ -381,10 +378,10 @@ void RowPainter::paintMisspelledMark(double orig_x, bool changed)
 {
        // if changed the misspelled marker gets placed slightly lower than normal
        // to avoid drawing at the same vertical offset
-       int const y = yo_ + solid_line_offset_ + solid_line_thickness_
+       float const y = yo_ + solid_line_offset_ + solid_line_thickness_
                + (changed ? solid_line_thickness_ + 1 : 0)
                + dotted_line_offset_;
-       pi_.pain.line(int(orig_x), y, int(x_), y, Color_error,
+       pi_.pain.line(int(orig_x), int(y), int(x_), int(y), Color_error,
                Painter::line_onoffdash, dotted_line_thickness_);
 }
 
@@ -896,9 +893,9 @@ void RowPainter::paintText()
                        // Calculate 1/3 height of the buffer's default font
                        FontMetrics const & fm
                                = theFontMetrics(pi_.base.bv->buffer().params().getFont());
-                       int const y_bar = change_running.deleted() ?
+                       float const y_bar = change_running.deleted() ?
                                yo_ - fm.maxAscent() / 3 : yo_ + 2 * solid_line_offset_ + solid_line_thickness_;
-                       pi_.pain.line(change_last_x, y_bar, int(x_), y_bar,
+                       pi_.pain.line(change_last_x, int(y_bar), int(x_), int(y_bar),
                                change_running.color(), Painter::line_solid, solid_line_thickness_);
 
                        // Change might continue with a different author or type
@@ -956,9 +953,9 @@ void RowPainter::paintText()
        if (change_running.changed()) {
                FontMetrics const & fm
                        = theFontMetrics(pi_.base.bv->buffer().params().getFont());
-               int const y_bar = change_running.deleted() ?
+               float const y_bar = change_running.deleted() ?
                                yo_ - fm.maxAscent() / 3 : yo_ + 2 * solid_line_offset_ + solid_line_thickness_;
-               pi_.pain.line(change_last_x, y_bar, int(x_), y_bar,
+               pi_.pain.line(change_last_x, int(y_bar), int(x_), int(y_bar),
                        change_running.color(), Painter::line_solid, solid_line_thickness_);
                change_running.setUnchanged();
        }