Scanner persisted freq file, TextField for current item (#1403)

* Don't truncate string passed to Text widget

* Focus TextField on touch like other fields

* TextField for current, save last opened freq file
This commit is contained in:
Kyle Reed 2023-08-23 11:51:28 -07:00 committed by GitHub
parent 4a1479957c
commit f537c7896e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 58 additions and 36 deletions

View file

@ -208,6 +208,10 @@ class Text : public Widget {
void paint(Painter& painter) override;
protected:
// NB: Don't truncate this string. The UI will only render
// as many characters as will fit in its rectange.
// Apps expect to be able to retrieve this string to avoid
// needing to hold additional copies in memory.
std::string text;
};
@ -703,6 +707,7 @@ class TextField : public Text {
bool on_key(KeyEvent key) override;
bool on_encoder(EncoderEvent delta) override;
bool on_touch(TouchEvent event) override;
private:
using Text::set;