X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FTextMetrics.cpp;h=3b871f7dfbba0e7d444b2547956a9b177415bda2;hb=eea79637c78bb9916031924eca7b305cfb8e83df;hp=39fddf750290c3d1b46bfe48dc17b45282bbb96a;hpb=1f07a7f929d34b0d64d839d5d7963ed60e04b5a3;p=features.git diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp index 39fddf7502..3b871f7dfb 100644 --- a/src/TextMetrics.cpp +++ b/src/TextMetrics.cpp @@ -24,7 +24,6 @@ #include "buffer_funcs.h" #include "BufferParams.h" #include "BufferView.h" -#include "Color.h" #include "CutAndPaste.h" #include "debug.h" #include "FontIterator.h" @@ -1935,7 +1934,7 @@ void TextMetrics::drawParagraph(PainterInfo & pi, pit_type pit, int x, int y) co if (row_selection || (!pi.full_repaint && row_has_changed)) { pi.pain.fillRectangle(x, y - rit->ascent(), width(), rit->height(), - Color_color(Color::color(pi.background_color))); + ColorCode(ColorCode(pi.background_color))); } if (row_selection) { DocIterator beg = bv_->cursor().selectionBegin(); @@ -2028,7 +2027,7 @@ void TextMetrics::drawSelection(PainterInfo & pi, if (middleTop < middleBottom) { // draw middle rectangle pi.pain.fillRectangle(x, middleTop, width(), middleBottom - middleTop, - Color::selection); + Color_selection); } if (!clipBelow) { @@ -2058,16 +2057,16 @@ void TextMetrics::drawRowSelection(PainterInfo & pi, int x, Row const & row, // draw the margins if (drawOnBegMargin) { if (text_->isRTL(buffer, beg.paragraph())) - pi.pain.fillRectangle(x + x1, y1, width() - x1, y2 - y1, Color::selection); + pi.pain.fillRectangle(x + x1, y1, width() - x1, y2 - y1, Color_selection); else - pi.pain.fillRectangle(x, y1, x1, y2 - y1, Color::selection); + pi.pain.fillRectangle(x, y1, x1, y2 - y1, Color_selection); } if (drawOnEndMargin) { if (text_->isRTL(buffer, beg.paragraph())) - pi.pain.fillRectangle(x, y1, x2, y2 - y1, Color::selection); + pi.pain.fillRectangle(x, y1, x2, y2 - y1, Color_selection); else - pi.pain.fillRectangle(x + x2, y1, width() - x2, y2 - y1, Color::selection); + pi.pain.fillRectangle(x + x2, y1, width() - x2, y2 - y1, Color_selection); } // if we are on a boundary from the beginning, it's probably @@ -2111,7 +2110,7 @@ void TextMetrics::drawRowSelection(PainterInfo & pi, int x, Row const & row, if (!(cur < end) || drawNow) { x2 = cursorX(cur.top(), cur.boundary()); pi.pain.fillRectangle(x + min(x1,x2), y1, abs(x2 - x1), y2 - y1, - Color::selection); + Color_selection); // reset x1, so it is set again next round (which will be on the // right side of a boundary or at the selection end)