Show the kMoveCursor in ColorPopup client area

This commit is contained in:
David Capello 2017-06-22 19:35:01 -03:00
parent 35764bd969
commit 5da6dc514a
2 changed files with 18 additions and 0 deletions

View File

@ -309,6 +309,23 @@ app::Color ColorPopup::getColor() const
return m_color;
}
bool ColorPopup::onProcessMessage(ui::Message* msg)
{
switch (msg->type()) {
case kSetCursorMessage: {
if (m_canPin) {
gfx::Point mousePos = static_cast<MouseMessage*>(msg)->position();
if (hitTest(mousePos) == HitTestCaption) {
set_mouse_cursor(kMoveCursor);
return true;
}
}
break;
}
}
return PopupWindowPin::onProcessMessage(msg);
}
void ColorPopup::onWindowResize()
{
PopupWindowPin::onWindowResize();

View File

@ -43,6 +43,7 @@ namespace app {
obs::signal<void(const app::Color&)> ColorChange;
protected:
bool onProcessMessage(ui::Message* msg) override;
void onWindowResize() override;
void onMakeFloating() override;
void onMakeFixed() override;