refactor app code (#93)
This commit is contained in:
committed by
GitHub
parent
a312bd5527
commit
d7b151ab88
@@ -9,7 +9,7 @@
|
||||
|
||||
namespace tt::app::textviewer {
|
||||
|
||||
static void on_show(App app, lv_obj_t* parent) {
|
||||
static void on_show(App& app, lv_obj_t* parent) {
|
||||
lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN);
|
||||
lvgl::toolbar_create(parent, app);
|
||||
|
||||
@@ -22,7 +22,7 @@ static void on_show(App app, lv_obj_t* parent) {
|
||||
|
||||
lv_obj_t* label = lv_label_create(wrapper);
|
||||
lv_obj_align(label, LV_ALIGN_CENTER, 0, 0);
|
||||
const Bundle& bundle = tt_app_get_parameters(app);
|
||||
const Bundle& bundle = app.getParameters();
|
||||
std::string file_argument;
|
||||
if (bundle.optString(TEXT_VIEWER_FILE_ARGUMENT, file_argument)) {
|
||||
std::string prefixed_path = "A:" + file_argument;
|
||||
@@ -35,7 +35,7 @@ extern const Manifest manifest = {
|
||||
.id = "TextViewer",
|
||||
.name = "Text Viewer",
|
||||
.type = TypeHidden,
|
||||
.on_show = &on_show
|
||||
.onShow = &on_show
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user