Changeset View
Changeset View
Standalone View
Standalone View
kdecoration/breezedecoration.h
Show All 24 Lines | |||||
25 | #include "breeze.h" | 25 | #include "breeze.h" | ||
26 | #include "breezesettings.h" | 26 | #include "breezesettings.h" | ||
27 | 27 | | |||
28 | #include <KDecoration2/Decoration> | 28 | #include <KDecoration2/Decoration> | ||
29 | #include <KDecoration2/DecoratedClient> | 29 | #include <KDecoration2/DecoratedClient> | ||
30 | #include <KDecoration2/DecorationSettings> | 30 | #include <KDecoration2/DecorationSettings> | ||
31 | 31 | | |||
32 | #include <QPalette> | 32 | #include <QPalette> | ||
33 | #include <QPropertyAnimation> | | |||
34 | #include <QVariant> | 33 | #include <QVariant> | ||
35 | 34 | | |||
35 | class QVariantAnimation; | ||||
36 | | ||||
36 | namespace KDecoration2 | 37 | namespace KDecoration2 | ||
37 | { | 38 | { | ||
38 | class DecorationButton; | 39 | class DecorationButton; | ||
39 | class DecorationButtonGroup; | 40 | class DecorationButtonGroup; | ||
40 | } | 41 | } | ||
41 | 42 | | |||
42 | namespace Breeze | 43 | namespace Breeze | ||
43 | { | 44 | { | ||
44 | class SizeGrip; | 45 | class SizeGrip; | ||
45 | class Decoration : public KDecoration2::Decoration | 46 | class Decoration : public KDecoration2::Decoration | ||
46 | { | 47 | { | ||
47 | Q_OBJECT | 48 | Q_OBJECT | ||
48 | 49 | | |||
49 | //* declare active state opacity | | |||
50 | Q_PROPERTY( qreal opacity READ opacity WRITE setOpacity ) | | |||
51 | | ||||
52 | public: | 50 | public: | ||
53 | 51 | | |||
54 | //* constructor | 52 | //* constructor | ||
55 | explicit Decoration(QObject *parent = nullptr, const QVariantList &args = QVariantList()); | 53 | explicit Decoration(QObject *parent = nullptr, const QVariantList &args = QVariantList()); | ||
56 | 54 | | |||
57 | //* destructor | 55 | //* destructor | ||
58 | virtual ~Decoration(); | 56 | virtual ~Decoration(); | ||
59 | 57 | | |||
▲ Show 20 Lines • Show All 80 Lines • ▼ Show 20 Line(s) | |||||
140 | InternalSettingsPtr m_internalSettings; | 138 | InternalSettingsPtr m_internalSettings; | ||
141 | KDecoration2::DecorationButtonGroup *m_leftButtons = nullptr; | 139 | KDecoration2::DecorationButtonGroup *m_leftButtons = nullptr; | ||
142 | KDecoration2::DecorationButtonGroup *m_rightButtons = nullptr; | 140 | KDecoration2::DecorationButtonGroup *m_rightButtons = nullptr; | ||
143 | 141 | | |||
144 | //* size grip widget | 142 | //* size grip widget | ||
145 | SizeGrip *m_sizeGrip = nullptr; | 143 | SizeGrip *m_sizeGrip = nullptr; | ||
146 | 144 | | |||
147 | //* active state change animation | 145 | //* active state change animation | ||
148 | QPropertyAnimation *m_animation; | 146 | QVariantAnimation *m_animation; | ||
149 | 147 | | |||
150 | //* active state change opacity | 148 | //* active state change opacity | ||
151 | qreal m_opacity = 0; | 149 | qreal m_opacity = 0; | ||
152 | 150 | | |||
153 | }; | 151 | }; | ||
154 | 152 | | |||
155 | bool Decoration::hasBorders() const | 153 | bool Decoration::hasBorders() const | ||
156 | { | 154 | { | ||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |