InfiniTimeOrg / InfiniTime

Firmware for Pinetime smartwatch written in C++ and based on FreeRTOS
GNU General Public License v3.0
2.65k stars 912 forks source link

Counter: cleanup container widget #1652

Closed some00 closed 1 year ago

Riksu9000 commented 1 year ago

What's the purpose of this change? When the screen is closed, all objects belonging to that screen are deleted. This increases the build size a bit.

some00 commented 1 year ago

I want to add a Counter in a Setting screen. Without deleting the container the list is drawn over the counter when I backout. The label is visible between list items.

Riksu9000 commented 1 year ago

The Counter is used in two setting screens and this isn't an issue in those. Have you created a new setting screen? Are you missing the destructor?

SettingSetDate::~SettingSetDate() {
  lv_obj_clean(lv_scr_act());
}
some00 commented 1 year ago

Thanks. Yes, I created my own settings screen and missed the destructor.