Skip to content

Commit

Permalink
fix(color): built in widgets not resizing properly when view decorati…
Browse files Browse the repository at this point in the history
…ons altered (#5247)
  • Loading branch information
philmoz authored Jul 4, 2024
1 parent b31c52c commit 1418e87
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion radio/src/gui/colorlcd/widget.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ class Widget : public ButtonBase
virtual void background() {}

// Update widget 'zone' data (for Lua widgets)
virtual void updateZoneRect(rect_t rect, bool updateUI = true) {}
virtual void updateZoneRect(rect_t rect, bool updateUI = true)
{
if (updateUI) update();
}

void enableFocus(bool enable);

Expand Down
1 change: 1 addition & 0 deletions radio/src/gui/colorlcd/widgets/widgets_container_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ class WidgetsContainerImpl : public WidgetsContainer

void updateZones() override
{
adjustLayout();
for (int i = 0; i < N; i++) {
if (widgets[i]) {
auto zone = getZone(i);
Expand Down

0 comments on commit 1418e87

Please sign in to comment.