Commit 30378466 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

Revert "Remove hover animations"

Causes flashing when unhovering a button with keyboard focus

This reverts commit 2454c120.
parent 93bd741b
......@@ -18,10 +18,7 @@ namespace Breeze
if( !widget ) return false;
// create new data class
// Stripping out the hover code causes a lot of problems due to the code's architecture being highly dependent on the animation engines to keep track of stuff like
// subcontrol rects and whatnot, so simply hardcoding this value to 0 will suffice for now.
if( !_hoverData.contains( widget ) ) _hoverData.insert( widget, new TabBarData( this, widget, 0 ), enabled() );
if( !_hoverData.contains( widget ) ) _hoverData.insert( widget, new TabBarData( this, widget, duration() ), enabled() );
if( !_focusData.contains( widget ) ) _focusData.insert( widget, new TabBarData( this, widget, duration() ), enabled() );
// connect destruction signal
......
......@@ -16,9 +16,7 @@ namespace Breeze
{
if( !widget ) return false;
// Stripping out the hover code causes a lot of problems due to the code's architecture being highly dependent on the animation engines to keep track of stuff like
// subcontrol rects and whatnot, so simply hardcoding this value to 0 will suffice for now.
if( mode&AnimationHover && !_hoverData.contains( widget ) ) { _hoverData.insert( widget, new WidgetStateData( this, widget, 0 ), enabled() ); }
if( mode&AnimationHover && !_hoverData.contains( widget ) ) { _hoverData.insert( widget, new WidgetStateData( this, widget, duration() ), enabled() ); }
if( mode&AnimationFocus && !_focusData.contains( widget ) ) { _focusData.insert( widget, new WidgetStateData( this, widget, duration() ), enabled() ); }
if( mode&AnimationEnable && !_enableData.contains( widget ) ) { _enableData.insert( widget, new EnableData( this, widget, duration() ), enabled() ); }
if( mode&AnimationPressed && !_pressedData.contains( widget ) ) { _pressedData.insert( widget, new WidgetStateData( this, widget, duration() ), enabled() ); }
......@@ -76,9 +74,6 @@ namespace Breeze
//____________________________________________________________
bool WidgetStateEngine::isAnimated( const QObject* object, AnimationMode mode )
{
// Stripping out the hover code causes a lot of problems due to the code's architecture being highly dependent on the animation engines to keep track of stuff like
// subcontrol rects and whatnot, so simply hardcoding this value to false will suffice for now.
if (mode == AnimationHover) return false;
DataMap<WidgetStateData>::Value data( WidgetStateEngine::data( object, mode ) );
return ( data && data.data()->animation() && data.data()->animation().data()->isRunning() );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment