mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-04-18 06:56:03 -04:00
Make the background paint to black again after opening fq modal
This commit is contained in:
parent
89da85dc2b
commit
0cd534ade0
12
firmware/application/external/gfxeq/ui_gfxeq.cpp
vendored
12
firmware/application/external/gfxeq/ui_gfxeq.cpp
vendored
@ -69,6 +69,15 @@ void gfxEQView::focus() {
|
||||
field_frequency.focus();
|
||||
}
|
||||
|
||||
void gfxEQView::on_show() {
|
||||
needs_background_redraw = true;
|
||||
set_dirty();
|
||||
}
|
||||
|
||||
void gfxEQView::on_hide() {
|
||||
needs_background_redraw = true;
|
||||
}
|
||||
|
||||
void gfxEQView::start() {
|
||||
if (!running) {
|
||||
running = true;
|
||||
@ -128,6 +137,9 @@ void gfxEQView::paint(Painter& painter) {
|
||||
initialized = true;
|
||||
start();
|
||||
painter.fill_rectangle({0, header_height, SCREEN_WIDTH, RENDER_HEIGHT}, Color(0, 0, 0));
|
||||
} else if (needs_background_redraw) {
|
||||
painter.fill_rectangle({0, header_height, SCREEN_WIDTH, RENDER_HEIGHT}, Color(0, 0, 0));
|
||||
needs_background_redraw = false;
|
||||
}
|
||||
render_equalizer(painter);
|
||||
}
|
||||
|
@ -32,6 +32,8 @@ class gfxEQView : public View {
|
||||
|
||||
void focus() override;
|
||||
std::string title() const override { return "gfxEQ"; }
|
||||
void on_show() override;
|
||||
void on_hide() override;
|
||||
|
||||
void paint(Painter& painter) override;
|
||||
|
||||
@ -52,6 +54,7 @@ class gfxEQView : public View {
|
||||
|
||||
NavigationView& nav_;
|
||||
bool initialized{false};
|
||||
bool needs_background_redraw{false};
|
||||
std::vector<int> bar_heights;
|
||||
std::vector<int> prev_bar_heights;
|
||||
bool running{false};
|
||||
|
Loading…
x
Reference in New Issue
Block a user