Ken Van Hoeylandt a2af95b92d
Merge develop into main (#338)
### Cardputer:
- Fix keyboard issue with up/down button conflict when selecting switch
- Fix backlight flickering

### UI improvements
- Removed a 3 pixel border that went around the entire desktop environment
- Improved system layout (GuiService)
- Statusbar: improved layout (mainly margin/padding)
- Toolbar: fixed margin/padding of all buttons, fixed alignment of all content
- Improved layout/UI of many apps

### Other
- Update LVGL to 9.3.0 official release (was dev version)
2025-09-16 23:12:07 +02:00

48 lines
1.1 KiB
C++

#include "Tactility/app/filebrowser/View.h"
#include "Tactility/app/filebrowser/State.h"
#include "Tactility/app/AppContext.h"
#include <Tactility/Assets.h>
#include <Tactility/service/loader/Loader.h>
#include <memory>
namespace tt::app::filebrowser {
constexpr auto* TAG = "FileBrowser";
extern const AppManifest manifest;
class FileBrowser : public App {
std::unique_ptr<View> view;
std::shared_ptr<State> state;
public:
FileBrowser() {
state = std::make_shared<State>();
view = std::make_unique<View>(state);
}
void onShow(AppContext& appContext, lv_obj_t* parent) override {
view->init(appContext, parent);
}
void onResult(AppContext& appContext, TT_UNUSED LaunchId launchId, Result result, std::unique_ptr<Bundle> bundle) override {
view->onResult(launchId, result, std::move(bundle));
}
};
extern const AppManifest manifest = {
.id = "Files",
.name = "Files",
.icon = TT_ASSETS_APP_ICON_FILES,
.type = Type::Hidden,
.createApp = create<FileBrowser>
};
void start() {
service::loader::startApp(manifest.id);
}
} // namespace