Compare commits

..

2 Commits

Author SHA1 Message Date
Erwin Ried 98ba332cda Version bump 2020-09-25 03:34:51 +02:00
Erwin Ried f3503e6844 Fix for the freezing when no on_touch_release function 2020-09-25 03:34:05 +02:00
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -213,7 +213,7 @@ public:
InformationView(NavigationView& nav);
private:
static constexpr auto version_string = "v1.2.2";
static constexpr auto version_string = "v1.2.3";
NavigationView& nav_;
Rectangle backdrop {
+3 -3
View File
@@ -913,12 +913,12 @@ bool Button::on_touch(const TouchEvent event) {
case TouchEvent::Type::End:
set_highlighted(false);
set_dirty();
if( on_select && !instant_exec_ ) {
on_select(*this);
}
if( on_touch_release) {
on_touch_release(*this);
}
if( on_select && !instant_exec_ ) {
on_select(*this);
}
return true;
default:
+2 -2
View File
@@ -378,8 +378,8 @@ private:
class Button : public Widget {
public:
std::function<void(Button&)> on_select { };
std::function<void(Button&)> on_touch_release { nullptr }; // Executed when releasing touch, after on_select.
std::function<void(Button&)> on_touch_press { nullptr }; // Executed when touching, before on_select.
std::function<void(Button&)> on_touch_release { }; // Executed when releasing touch, after on_select.
std::function<void(Button&)> on_touch_press { }; // Executed when touching, before on_select.
std::function<bool(Button&, KeyEvent)> on_dir { };
std::function<void(Button&)> on_highlight { };