From c3452835a8dd7ac0d9b76d3a8df7c22d81bcf5ff Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Mon, 29 Oct 2007 10:36:20 +0000 Subject: [PATCH] * MetricsInfo::background_color: int -> ColorCode git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21255 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/MetricsInfo.h | 3 ++- src/TextMetrics.cpp | 3 +-- src/insets/InsetCollapsable.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/MetricsInfo.h b/src/MetricsInfo.h index 32baef1759..1275090702 100644 --- a/src/MetricsInfo.h +++ b/src/MetricsInfo.h @@ -12,6 +12,7 @@ #ifndef METRICSINFO_H #define METRICSINFO_H +#include "ColorCode.h" #include "FontInfo.h" #include "support/docstring.h" #include @@ -99,7 +100,7 @@ public: /// bool full_repaint; /// - int background_color; + ColorCode background_color; }; class TextMetricsInfo {}; diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp index 9d97abb25e..5c68b70230 100644 --- a/src/TextMetrics.cpp +++ b/src/TextMetrics.cpp @@ -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(); diff --git a/src/insets/InsetCollapsable.cpp b/src/insets/InsetCollapsable.cpp index 8179f1c6d6..dfbf9b4d99 100644 --- a/src/insets/InsetCollapsable.cpp +++ b/src/insets/InsetCollapsable.cpp @@ -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 -- 2.39.2