mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-20 03:47:45 +00:00
Paint background of Text object before string.
This commit is contained in:
@@ -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
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user