From 4cde7cacf3c5e9bae1fab4793939a8c4a55e7b49 Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Mon, 9 Sep 2019 11:20:58 +0200 Subject: [PATCH 1/2] Fix ImageButton bool return value for pressed. This was a regression in 0.2.0 --- src/widget/image.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widget/image.rs b/src/widget/image.rs index e805520..86b6b0f 100644 --- a/src/widget/image.rs +++ b/src/widget/image.rs @@ -129,7 +129,7 @@ impl ImageButton { self } /// Builds the image button - pub fn build(self, _: &Ui) { + pub fn build(self, _: &Ui) -> bool { unsafe { sys::igImageButton( self.texture_id.id() as *mut c_void, @@ -139,7 +139,7 @@ impl ImageButton { self.frame_padding, self.bg_col.into(), self.tint_col.into(), - ); + ) } } } From 3699401348a011219e23db1563e87907d4e225f3 Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Mon, 9 Sep 2019 11:36:48 +0200 Subject: [PATCH 2/2] Add fix to changelog --- CHANGELOG.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.markdown b/CHANGELOG.markdown index 97607b2..56122ea 100644 --- a/CHANGELOG.markdown +++ b/CHANGELOG.markdown @@ -2,6 +2,8 @@ ## [Unreleased] +- Fix ImageButton bool return value + ### Changed - Fix backspace handling on macOS