Fix formatting
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
#include "displayapp/screens/CheckboxList.h"
|
||||
#include "displayapp/DisplayApp.h"
|
||||
#include "displayapp/screens/Styles.h"
|
||||
#include "displayapp/screens/Symbols.h"
|
||||
|
||||
using namespace Pinetime::Applications::Screens;
|
||||
|
||||
@@ -20,10 +19,13 @@ CheckboxList::CheckboxList(const uint8_t screenID,
|
||||
const char* optionsTitle,
|
||||
const char* optionsSymbol,
|
||||
void (Controllers::Settings::*SetOptionIndex)(uint8_t),
|
||||
uint8_t (Controllers::Settings::*GetOptionIndex )() const,
|
||||
uint8_t (Controllers::Settings::*GetOptionIndex)() const,
|
||||
std::array<const char*, MAXLISTITEMS> options)
|
||||
: Screen(app), screenID {screenID}, settingsController {settingsController},
|
||||
SetOptionIndex {SetOptionIndex}, GetOptionIndex {GetOptionIndex},
|
||||
: Screen(app),
|
||||
screenID {screenID},
|
||||
settingsController {settingsController},
|
||||
SetOptionIndex {SetOptionIndex},
|
||||
GetOptionIndex {GetOptionIndex},
|
||||
options {options} {
|
||||
|
||||
settingsController.SetWatchfacesMenu(screenID);
|
||||
@@ -87,7 +89,7 @@ CheckboxList::CheckboxList(const uint8_t screenID,
|
||||
lv_obj_set_event_cb(cbOption[i], event_handler);
|
||||
SetRadioButtonStyle(cbOption[i]);
|
||||
|
||||
if (static_cast<unsigned int>((settingsController.*GetOptionIndex)() - MAXLISTITEMS*screenID) == i) {
|
||||
if (static_cast<unsigned int>((settingsController.*GetOptionIndex)() - MAXLISTITEMS * screenID) == i) {
|
||||
lv_checkbox_set_checked(cbOption[i], true);
|
||||
}
|
||||
}
|
||||
@@ -105,7 +107,7 @@ void CheckboxList::UpdateSelected(lv_obj_t* object, lv_event_t event) {
|
||||
if (strcmp(options[i], "")) {
|
||||
if (object == cbOption[i]) {
|
||||
lv_checkbox_set_checked(cbOption[i], true);
|
||||
(settingsController.*SetOptionIndex)(MAXLISTITEMS*screenID + i);
|
||||
(settingsController.*SetOptionIndex)(MAXLISTITEMS * screenID + i);
|
||||
} else {
|
||||
lv_checkbox_set_checked(cbOption[i], false);
|
||||
}
|
||||
|
Reference in New Issue
Block a user