From 9cc8d43f0a9d11286556a440a0dc172e1f593aad Mon Sep 17 00:00:00 2001 From: David Capello Date: Wed, 20 Apr 2016 09:37:49 -0300 Subject: [PATCH] Show color on status bar when mouse is over ColorTintShadeTone (and not captured) --- src/app/ui/color_tint_shade_tone.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/app/ui/color_tint_shade_tone.cpp b/src/app/ui/color_tint_shade_tone.cpp index d60526e2f..20842a76e 100644 --- a/src/app/ui/color_tint_shade_tone.cpp +++ b/src/app/ui/color_tint_shade_tone.cpp @@ -153,21 +153,20 @@ bool ColorTintShadeTone::onProcessMessage(ui::Message* msg) // Continue... - case kMouseMoveMessage: - if (hasCapture()) { - MouseMessage* mouseMsg = static_cast(msg); + case kMouseMoveMessage: { + MouseMessage* mouseMsg = static_cast(msg); - if (msg->type() == kMouseDownMessage) + if (msg->type() == kMouseDownMessage) m_capturedInHue = inHueBarArea(mouseMsg->position()); - app::Color color = getColorByPosition(mouseMsg->position()); - if (color != app::Color::fromMask()) { - StatusBar::instance()->showColor(0, "", color); - if (hasCapture()) - ColorChange(color, mouseMsg->buttons()); - } + app::Color color = getColorByPosition(mouseMsg->position()); + if (color != app::Color::fromMask()) { + StatusBar::instance()->showColor(0, "", color); + if (hasCapture()) + ColorChange(color, mouseMsg->buttons()); } break; + } case kMouseUpMessage: if (hasCapture()) {