mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-24 04:27:42 +00:00
Prepare for display orientation part 1 (#2661)
This commit is contained in:
@@ -55,7 +55,7 @@ SpectrumPainterView::SpectrumPainterView(
|
||||
&field_pause,
|
||||
});
|
||||
|
||||
Rect view_rect = {0, 3 * 8, 240, 80};
|
||||
Rect view_rect = {0, 3 * 8, screen_width, 80};
|
||||
input_image.set_parent_rect(view_rect);
|
||||
input_text.set_parent_rect(view_rect);
|
||||
|
||||
|
@@ -89,7 +89,7 @@ class SpectrumPainterView : public View {
|
||||
|
||||
static constexpr int32_t footer_location = 15 * 16 + 8;
|
||||
ProgressBar progressbar{
|
||||
{4, footer_location - 16, 240 - 8, 16}};
|
||||
{4, footer_location - 16, screen_width - 8, 16}};
|
||||
|
||||
Labels labels{
|
||||
{{10 * 8, footer_location + 1 * 16}, "GAIN A:", Theme::getInstance()->fg_light->foreground},
|
||||
|
@@ -244,12 +244,12 @@ std::vector<uint8_t> SpectrumInputImageView::get_line(uint16_t y) {
|
||||
|
||||
void SpectrumInputImageView::paint(Painter& painter) {
|
||||
painter.fill_rectangle(
|
||||
{{0, 40}, {240, 204}},
|
||||
{{0, 40}, {screen_width, 204}},
|
||||
style().background);
|
||||
|
||||
if (!painted) {
|
||||
// This is very slow for big pictures. Do only once.
|
||||
this->drawBMP_scaled({{0, 40}, {240, 160}}, this->file);
|
||||
this->drawBMP_scaled({{0, 40}, {screen_width, 160}}, this->file);
|
||||
painted = true;
|
||||
}
|
||||
}
|
||||
|
@@ -73,7 +73,7 @@ void SpectrumInputTextView::paint(Painter& painter) {
|
||||
}
|
||||
|
||||
painter.fill_rectangle(
|
||||
{{0, 40}, {240, 204}},
|
||||
{{0, 40}, {screen_width, 204}},
|
||||
style().background);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user