]> git.lyx.org Git - features.git/commitdiff
* MetricsInfo::background_color: int -> ColorCode
authorAbdelrazak Younes <younes@lyx.org>
Mon, 29 Oct 2007 10:36:20 +0000 (10:36 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Mon, 29 Oct 2007 10:36:20 +0000 (10:36 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21255 a592a061-630c-0410-9148-cb99ea01b6c8

src/MetricsInfo.h
src/TextMetrics.cpp
src/insets/InsetCollapsable.cpp

index 32baef17590be047e909b006efa897ec6c2f2c79..1275090702454a5ea97135b247b2b58a242e63d7 100644 (file)
@@ -12,6 +12,7 @@
 #ifndef METRICSINFO_H
 #define METRICSINFO_H
 
+#include "ColorCode.h"
 #include "FontInfo.h"
 #include "support/docstring.h"
 #include <string>
@@ -99,7 +100,7 @@ public:
        ///
        bool full_repaint;
        ///
-       int background_color;
+       ColorCode background_color;
 };
 
 class TextMetricsInfo {};
index 9d97abb25ee8d6145d625469b7b502f6554c47c7..5c68b70230f510a633a75bcf3e09ed5108bf9acb 100644 (file)
@@ -1934,8 +1934,7 @@ void TextMetrics::drawParagraph(PainterInfo & pi, pit_type pit, int x, int y) co
                // (if paragraph background was not cleared)
                if (row_selection || (!pi.full_repaint && row_has_changed)) {
                        pi.pain.fillRectangle(x, y - rit->ascent(),
-                               width(), rit->height(),
-                               ColorCode(ColorCode(pi.background_color)));
+                               width(), rit->height(), pi.background_color);
                }
                if (row_selection) {
                        DocIterator beg = bv_->cursor().selectionBegin();
index 8179f1c6d637d6ccc671edc1be256800dccf1178..dfbf9b4d99ca3c04e13f4fdeaf9bdf3bbc608788 100644 (file)
@@ -231,7 +231,7 @@ bool InsetCollapsable::setMouseHover(bool mouse_hover)
 void InsetCollapsable::draw(PainterInfo & pi, int x, int y) const
 {
        autoOpen_ = pi.base.bv->cursor().isInside(this);
-       int const old_color = pi.background_color;
+       ColorCode old_color = pi.background_color;
        pi.background_color = backgroundColor();
 
        // Draw button first -- top, left or only