Paint background of Text object before string.

This commit is contained in:
Jared Boone 2016-01-26 13:00:36 -08:00
parent c1f7f23367
commit a13e19a907
2 changed files with 8 additions and 2 deletions

View file

@ -291,9 +291,14 @@ void Text::set(const std::string value) {
}
void Text::paint(Painter& painter) {
const auto rect = screen_rect();
const auto s = style();
painter.fill_rectangle(rect, s.background);
painter.draw_string(
screen_pos(),
style(),
rect.pos,
s,
text
);
}