mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 10:18:50 +00:00
* MetricsInfo::background_color: int -> ColorCode
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21255 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
608236c0db
commit
c3452835a8
@ -12,6 +12,7 @@
|
|||||||
#ifndef METRICSINFO_H
|
#ifndef METRICSINFO_H
|
||||||
#define METRICSINFO_H
|
#define METRICSINFO_H
|
||||||
|
|
||||||
|
#include "ColorCode.h"
|
||||||
#include "FontInfo.h"
|
#include "FontInfo.h"
|
||||||
#include "support/docstring.h"
|
#include "support/docstring.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -99,7 +100,7 @@ public:
|
|||||||
///
|
///
|
||||||
bool full_repaint;
|
bool full_repaint;
|
||||||
///
|
///
|
||||||
int background_color;
|
ColorCode background_color;
|
||||||
};
|
};
|
||||||
|
|
||||||
class TextMetricsInfo {};
|
class TextMetricsInfo {};
|
||||||
|
@ -1934,8 +1934,7 @@ void TextMetrics::drawParagraph(PainterInfo & pi, pit_type pit, int x, int y) co
|
|||||||
// (if paragraph background was not cleared)
|
// (if paragraph background was not cleared)
|
||||||
if (row_selection || (!pi.full_repaint && row_has_changed)) {
|
if (row_selection || (!pi.full_repaint && row_has_changed)) {
|
||||||
pi.pain.fillRectangle(x, y - rit->ascent(),
|
pi.pain.fillRectangle(x, y - rit->ascent(),
|
||||||
width(), rit->height(),
|
width(), rit->height(), pi.background_color);
|
||||||
ColorCode(ColorCode(pi.background_color)));
|
|
||||||
}
|
}
|
||||||
if (row_selection) {
|
if (row_selection) {
|
||||||
DocIterator beg = bv_->cursor().selectionBegin();
|
DocIterator beg = bv_->cursor().selectionBegin();
|
||||||
|
@ -231,7 +231,7 @@ bool InsetCollapsable::setMouseHover(bool mouse_hover)
|
|||||||
void InsetCollapsable::draw(PainterInfo & pi, int x, int y) const
|
void InsetCollapsable::draw(PainterInfo & pi, int x, int y) const
|
||||||
{
|
{
|
||||||
autoOpen_ = pi.base.bv->cursor().isInside(this);
|
autoOpen_ = pi.base.bv->cursor().isInside(this);
|
||||||
int const old_color = pi.background_color;
|
ColorCode old_color = pi.background_color;
|
||||||
pi.background_color = backgroundColor();
|
pi.background_color = backgroundColor();
|
||||||
|
|
||||||
// Draw button first -- top, left or only
|
// Draw button first -- top, left or only
|
||||||
|
Loading…
Reference in New Issue
Block a user