summaryrefslogtreecommitdiff
path: root/src/DisplayApp/Screens/Label.h
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2020-08-14 08:05:44 (GMT)
committerJF <jf@codingfield.com>2020-08-14 08:05:44 (GMT)
commit6c678e872d51247f5e47730218598209e96bdd0a (patch)
tree00ad6d1e622b113b8e0a03f890703f5b7adeb8c1 /src/DisplayApp/Screens/Label.h
parentf5328ec9eb9d55423b4e511910721d839cacadd8 (diff)
Screens::Label is now a subclass of Screen.
Diffstat (limited to 'src/DisplayApp/Screens/Label.h')
-rw-r--r--src/DisplayApp/Screens/Label.h28
1 files changed, 3 insertions, 25 deletions
diff --git a/src/DisplayApp/Screens/Label.h b/src/DisplayApp/Screens/Label.h
index 9d91974..3e7b379 100644
--- a/src/DisplayApp/Screens/Label.h
+++ b/src/DisplayApp/Screens/Label.h
@@ -7,33 +7,11 @@
namespace Pinetime {
namespace Applications {
namespace Screens {
- class Label {
- public:
- Label() = default;
- explicit Label(const char* text);
- ~Label();
- void Refresh();
-
- void Hide();
- void Show();
- private:
- lv_obj_t * label = nullptr;
- const char* text = nullptr;
- };
- class Label2 : public Screen {
+ class Label : public Screen {
public:
- Label2(DisplayApp* app, const char* text) : Screen(app), text{text} {
- label = lv_label_create(lv_scr_act(), NULL);
- lv_label_set_align(label, LV_LABEL_ALIGN_LEFT);
- lv_obj_set_size(label, 240, 240);
- lv_label_set_text(label, text);
- }
-
- ~Label2() override {
- lv_obj_clean(lv_scr_act());
- }
-
+ Label(DisplayApp* app, const char* text);
+ ~Label() override;
bool Refresh() override {return false;}
private: