Commit 19348e1c authored by Michail Vourlakos's avatar Michail Vourlakos

enable animations for standalone created buttons

--as mentioned at T9899 we are not calling the correct
creator when buttons are created in Standalone mode and
as such animations are disabled when BreezeButton is created
from plasma applets. This patch fixes this and restores
the Standalone behavior mode in order to be identical
with the default one.

Test Plan:
-check that window title bars still work
-check that breeze window buttons in titlebar editor buttons
still work
-check that when buttons are used in a plasma applet
they are animated

Reviewers: #breeze, zzag

Reviewed By: zzag

Subscribers: plasma-devel

Tags: #plasma

Differential Revision:
parent 663ef0c6
......@@ -62,11 +62,14 @@ namespace Breeze
Button::Button(QObject *parent, const QVariantList &args)
: DecorationButton(<DecorationButtonType>(),<Decoration*>(), parent)
, m_flag(FlagStandalone)
, m_animation( new QPropertyAnimation( this ) )
: Button(<DecorationButtonType>(),<Decoration*>(), parent)
m_flag = FlagStandalone;
//! icon size must return to !valid because it was altered from the default constructor,
//! in Standalone mode the button is not using the decoration metrics but its geometry
m_iconSize = QSize(-1, -1);
Button *Button::create(DecorationButtonType type, KDecoration2::Decoration *decoration, QObject *parent)
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