Class FButton: mouse click with unsetClickAnimation() works correctly now

This commit is contained in:
Markus Gans 2015-06-21 21:53:27 +02:00
parent de68b4919e
commit 6e1392aa65
1 changed files with 9 additions and 6 deletions

View File

@ -130,7 +130,7 @@ void FButton::draw()
isNoUnderline = ((flags & NO_UNDERLINE) != 0); isNoUnderline = ((flags & NO_UNDERLINE) != 0);
setUpdateVTerm(false); setUpdateVTerm(false);
if ( button_down ) if ( button_down && click_animation )
{ {
// noshadow + indent one character to the right // noshadow + indent one character to the right
if ( isFlat ) if ( isFlat )
@ -600,11 +600,14 @@ void FButton::onMouseMove (FMouseEvent* event)
return; return;
FPoint gPos = event->getGlobalPos(); FPoint gPos = event->getGlobalPos();
if ( click_animation )
{
if ( getGeometryGlobal().contains(gPos) ) if ( getGeometryGlobal().contains(gPos) )
setDown(); setDown();
else else
setUp(); setUp();
} }
}
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FButton::onAccel (FAccelEvent* event) void FButton::onAccel (FAccelEvent* event)