Skip to content

Commit f5785fd

Browse files
authored
Fixed bug in component/button example: (#1107)
- The '-1' and '+1' buttons now correctly increment and decrement. - Previously it was vice versa.s
1 parent 853d87e commit f5785fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/component/button.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ int main() {
3434
int value = 50;
3535

3636
// clang-format off
37-
auto btn_dec_01 = Button("-1", [&] { value += 1; }, Style());
38-
auto btn_inc_01 = Button("+1", [&] { value -= 1; }, Style());
37+
auto btn_dec_01 = Button("-1", [&] { value -= 1; }, Style());
38+
auto btn_inc_01 = Button("+1", [&] { value += 1; }, Style());
3939
auto btn_dec_10 = Button("-10", [&] { value -= 10; }, Style());
4040
auto btn_inc_10 = Button("+10", [&] { value += 10; }, Style());
4141
// clang-format on

0 commit comments

Comments
 (0)