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

enable animations for standalone created buttons

Summary:
--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: https://phabricator.kde.org/D16596
parent 663ef0c6
......@@ -62,11 +62,14 @@ namespace Breeze
//__________________________________________________________________
Button::Button(QObject *parent, const QVariantList &args)
: DecorationButton(args.at(0).value<DecorationButtonType>(), args.at(1).value<Decoration*>(), parent)
, m_flag(FlagStandalone)
, m_animation( new QPropertyAnimation( this ) )
{}
: Button(args.at(0).value<DecorationButtonType>(), args.at(1).value<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