mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-12-24 23:09:26 -05:00
Fix initial focus on ERT, TPMS apps.
This commit is contained in:
parent
cb403160b3
commit
07b8c6c661
@ -149,6 +149,10 @@ ERTAppView::~ERTAppView() {
|
|||||||
EventDispatcher::message_map().unregister_handler(Message::ID::ERTPacket);
|
EventDispatcher::message_map().unregister_handler(Message::ID::ERTPacket);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ERTAppView::focus() {
|
||||||
|
recent_entries_view.focus();
|
||||||
|
}
|
||||||
|
|
||||||
void ERTAppView::set_parent_rect(const Rect new_parent_rect) {
|
void ERTAppView::set_parent_rect(const Rect new_parent_rect) {
|
||||||
View::set_parent_rect(new_parent_rect);
|
View::set_parent_rect(new_parent_rect);
|
||||||
recent_entries_view.set_parent_rect({ 0, 0, new_parent_rect.width(), new_parent_rect.height() });
|
recent_entries_view.set_parent_rect({ 0, 0, new_parent_rect.width(), new_parent_rect.height() });
|
||||||
|
@ -83,6 +83,8 @@ public:
|
|||||||
// TODO: Add flag to View that specifies view does not need to be cleared before painting.
|
// TODO: Add flag to View that specifies view does not need to be cleared before painting.
|
||||||
void paint(Painter&) override { };
|
void paint(Painter&) override { };
|
||||||
|
|
||||||
|
void focus() override;
|
||||||
|
|
||||||
std::string title() const override { return "ERT"; };
|
std::string title() const override { return "ERT"; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -257,6 +257,10 @@ TPMSAppView::~TPMSAppView() {
|
|||||||
EventDispatcher::message_map().unregister_handler(Message::ID::TPMSPacket);
|
EventDispatcher::message_map().unregister_handler(Message::ID::TPMSPacket);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TPMSAppView::focus() {
|
||||||
|
recent_entries_view.focus();
|
||||||
|
}
|
||||||
|
|
||||||
void TPMSAppView::set_parent_rect(const Rect new_parent_rect) {
|
void TPMSAppView::set_parent_rect(const Rect new_parent_rect) {
|
||||||
View::set_parent_rect(new_parent_rect);
|
View::set_parent_rect(new_parent_rect);
|
||||||
recent_entries_view.set_parent_rect({ 0, 0, new_parent_rect.width(), new_parent_rect.height() });
|
recent_entries_view.set_parent_rect({ 0, 0, new_parent_rect.width(), new_parent_rect.height() });
|
||||||
|
@ -207,6 +207,8 @@ public:
|
|||||||
// TODO: Add flag to View that specifies view does not need to be cleared before painting.
|
// TODO: Add flag to View that specifies view does not need to be cleared before painting.
|
||||||
void paint(Painter&) override { };
|
void paint(Painter&) override { };
|
||||||
|
|
||||||
|
void focus() override;
|
||||||
|
|
||||||
std::string title() const override { return "TPMS"; };
|
std::string title() const override { return "TPMS"; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user