diff --git a/src/apps/showimage/ShowImageWindow.cpp b/src/apps/showimage/ShowImageWindow.cpp index 46efa71ff6..efe67757d0 100644 --- a/src/apps/showimage/ShowImageWindow.cpp +++ b/src/apps/showimage/ShowImageWindow.cpp @@ -969,9 +969,8 @@ ShowImageWindow::MessageReceived(BMessage* message) break; case kMsgOriginalSize: - if (message->FindInt32("behavior") == BButton::B_TOGGLE_BEHAVIOR) - { - bool force = message->FindInt32("be:value"); + if (message->FindInt32("behavior") == BButton::B_TOGGLE_BEHAVIOR) { + bool force = (message->FindInt32("be:value") == B_CONTROL_ON); fImageView->ForceOriginalSize(force); if (!force) break; diff --git a/src/apps/showimage/ToolBarView.cpp b/src/apps/showimage/ToolBarView.cpp index 58c37f270a..ba237f3981 100644 --- a/src/apps/showimage/ToolBarView.cpp +++ b/src/apps/showimage/ToolBarView.cpp @@ -10,18 +10,19 @@ #include #include -class LockableButton: public BButton -{ +class LockableButton: public BButton { public: - LockableButton(const char* name, const char* label, BMessage* message); + LockableButton(const char* name, const char* label, + BMessage* message); - void MouseDown(BPoint point); + void MouseDown(BPoint point); }; LockableButton::LockableButton(const char* name, const char* label, BMessage* message) - : BButton(name, label, message) + : + BButton(name, label, message) { } @@ -29,7 +30,7 @@ LockableButton::LockableButton(const char* name, const char* label, void LockableButton::MouseDown(BPoint point) { - if (modifiers() & B_SHIFT_KEY || Value() == B_CONTROL_ON) + if ((modifiers() & B_SHIFT_KEY) != 0 || Value() == B_CONTROL_ON) SetBehavior(B_TOGGLE_BEHAVIOR); else SetBehavior(B_BUTTON_BEHAVIOR);