int w = 0;
int a = 0;
int d = 0;
int w = 0;
int a = 0;
int d = 0;
+ Color const col = pi.full_repaint ? Color_none : pi.backgroundColor(this);
theFontMetrics(font).rectText(buttonLabel(bv), w, a, d);
int const ww = max(textdim.wid, w);
pi.pain.rectText(x + (ww - w) / 2, y + desc + a,
theFontMetrics(font).rectText(buttonLabel(bv), w, a, d);
int const ww = max(textdim.wid, w);
pi.pain.rectText(x + (ww - w) / 2, y + desc + a,
- buttonLabel(bv), font, Color_none, Color_none);
+ buttonLabel(bv), font, col, Color_none);
}
int const y1 = y - textdim.asc + 3;
}
int const y1 = y - textdim.asc + 3;
void metrics(MetricsInfo &, Dimension &) const;
///
void draw(PainterInfo & pi, int x, int y) const;
void metrics(MetricsInfo &, Dimension &) const;
///
void draw(PainterInfo & pi, int x, int y) const;
+ ///
+ virtual void drawBackground(PainterInfo &, int, int) const {}
/// return x,y of given position relative to the inset's baseline
void cursorPos(BufferView const & bv, CursorSlice const & sl,
/// return x,y of given position relative to the inset's baseline
void cursorPos(BufferView const & bv, CursorSlice const & sl,
int const xframe = x + TEXT_TO_INSET_OFFSET / 2;
bool change_drawn = false;
if (drawFrame_ || pi.full_repaint) {
int const xframe = x + TEXT_TO_INSET_OFFSET / 2;
bool change_drawn = false;
if (drawFrame_ || pi.full_repaint) {
+ if (pi.full_repaint)
+ pi.pain.fillRectangle(xframe, yframe, w, h,
+ pi.backgroundColor(this));
+
// Change color of the frame in tracked changes, like for tabulars.
// Only do so if the color is not custom. But do so even if RowPainter
// handles the strike-through already.
// Change color of the frame in tracked changes, like for tabulars.
// Only do so if the color is not custom. But do so even if RowPainter
// handles the strike-through already.
void metrics(MetricsInfo & mi, Dimension & dim) const;
///
void draw(PainterInfo & pi, int x, int y) const;
void metrics(MetricsInfo & mi, Dimension & dim) const;
///
void draw(PainterInfo & pi, int x, int y) const;
+ /// Drawing background is handled in draw
+ virtual void drawBackground(PainterInfo &, int, int) const {}
///
bool editable() const { return true; }
///
///
bool editable() const { return true; }
///