[DEBUG] reset zoom in scrolled windows when ctrl+middle button

This commit is contained in:
Edouard DUPIN 2012-10-17 17:29:39 +02:00
parent ff84a9ea20
commit 18087d132a

View File

@ -162,13 +162,20 @@ bool ewol::WidgetScrooled::OnEventInput(ewol::inputType_te type, int32_t IdInput
} }
} }
}else if (2 == IdInput) { }else if (2 == IdInput) {
if (ewol::EVENT_INPUT_TYPE_DOWN == typeEvent) { if (true == ewol::IsSetCtrl()) {
m_highSpeedMode = ewol::SCROLL_INIT; if (ewol::EVENT_INPUT_TYPE_DOWN == typeEvent) {
m_highSpeedType = ewol::INPUT_TYPE_MOUSE; float zoom = 1.0;
m_highSpeedStartPos.x = relativePos.x; SetZoom(zoom);
m_highSpeedStartPos.y = relativePos.y; }
m_highSpeedButton = 2; } else {
return true; if (ewol::EVENT_INPUT_TYPE_DOWN == typeEvent) {
m_highSpeedMode = ewol::SCROLL_INIT;
m_highSpeedType = ewol::INPUT_TYPE_MOUSE;
m_highSpeedStartPos.x = relativePos.x;
m_highSpeedStartPos.y = relativePos.y;
m_highSpeedButton = 2;
return true;
}
} }
} else if (ewol::SCROLL_DISABLE!=m_highSpeedMode && ewol::EVENT_INPUT_TYPE_LEAVE == typeEvent) { } else if (ewol::SCROLL_DISABLE!=m_highSpeedMode && ewol::EVENT_INPUT_TYPE_LEAVE == typeEvent) {
m_highSpeedMode = ewol::SCROLL_DISABLE; m_highSpeedMode = ewol::SCROLL_DISABLE;