mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-01-13 02:33:37 +00:00
Paint background of Text object before string.
This commit is contained in:
parent
c1f7f23367
commit
a13e19a907
@ -299,6 +299,7 @@ void AISRecentEntryDetailView::set_entry(const AISRecentEntry& entry) {
|
|||||||
|
|
||||||
AISAppView::AISAppView(NavigationView&) {
|
AISAppView::AISAppView(NavigationView&) {
|
||||||
add_children({ {
|
add_children({ {
|
||||||
|
&label_app_name,
|
||||||
&label_channel,
|
&label_channel,
|
||||||
&options_channel,
|
&options_channel,
|
||||||
&recent_entries_view,
|
&recent_entries_view,
|
||||||
|
@ -291,9 +291,14 @@ void Text::set(const std::string value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Text::paint(Painter& painter) {
|
void Text::paint(Painter& painter) {
|
||||||
|
const auto rect = screen_rect();
|
||||||
|
const auto s = style();
|
||||||
|
|
||||||
|
painter.fill_rectangle(rect, s.background);
|
||||||
|
|
||||||
painter.draw_string(
|
painter.draw_string(
|
||||||
screen_pos(),
|
rect.pos,
|
||||||
style(),
|
s,
|
||||||
text
|
text
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user