Aurorae connects to new changed signals by KDecorationOptions
No longer implements the reset() method by KDecorationFactory.icc-effect-5.14.5
parent
d403bfcadb
commit
9797fe2122
|
@ -46,6 +46,9 @@ AuroraeFactory::AuroraeFactory(QObject *parent)
|
|||
, m_engineType(AuroraeEngine)
|
||||
{
|
||||
init();
|
||||
connect(options(), &KDecorationOptions::buttonsChanged, this, &AuroraeFactory::buttonsChanged);
|
||||
connect(options(), &KDecorationOptions::fontsChanged, this, &AuroraeFactory::titleFontChanged);
|
||||
connect(options(), &KDecorationOptions::configChanged, this, &AuroraeFactory::updateConfiguration);
|
||||
}
|
||||
|
||||
void AuroraeFactory::init()
|
||||
|
@ -152,17 +155,8 @@ AuroraeFactory *AuroraeFactory::instance()
|
|||
return s_instance;
|
||||
}
|
||||
|
||||
bool AuroraeFactory::reset(unsigned long changed)
|
||||
void AuroraeFactory::updateConfiguration()
|
||||
{
|
||||
if (changed & SettingButtons) {
|
||||
emit buttonsChanged();
|
||||
}
|
||||
if (changed & SettingFont){
|
||||
emit titleFontChanged();
|
||||
}
|
||||
if (changed & SettingCompositing) {
|
||||
return false;
|
||||
}
|
||||
const KConfig conf(QStringLiteral("auroraerc"));
|
||||
const KConfigGroup group(&conf, "Engine");
|
||||
const QString themeName = group.readEntry("ThemeName", "example-deco");
|
||||
|
@ -171,15 +165,13 @@ bool AuroraeFactory::reset(unsigned long changed)
|
|||
if (themeName != m_themeName) {
|
||||
m_engine->clearComponentCache();
|
||||
init();
|
||||
// recreate all decorations
|
||||
return true;
|
||||
emit recreateDecorations();
|
||||
}
|
||||
if (m_engineType == AuroraeEngine) {
|
||||
m_theme->setBorderSize((KDecorationDefines::BorderSize)themeGroup.readEntry<int>("BorderSize", KDecorationDefines::BorderNormal));
|
||||
m_theme->setButtonSize((KDecorationDefines::BorderSize)themeGroup.readEntry<int>("ButtonSize", KDecorationDefines::BorderNormal));
|
||||
}
|
||||
emit configChanged();
|
||||
return false; // need hard reset
|
||||
}
|
||||
|
||||
bool AuroraeFactory::supports(Ability ability) const
|
||||
|
|
|
@ -44,7 +44,6 @@ public:
|
|||
~AuroraeFactory();
|
||||
|
||||
static AuroraeFactory* instance();
|
||||
bool reset(unsigned long changed);
|
||||
KDecoration *createDecoration(KDecorationBridge*);
|
||||
bool supports(Ability ability) const;
|
||||
virtual QList< BorderSize > borderSizes() const;
|
||||
|
@ -72,6 +71,9 @@ Q_SIGNALS:
|
|||
void titleFontChanged();
|
||||
void configChanged();
|
||||
|
||||
private Q_SLOTS:
|
||||
void updateConfiguration();
|
||||
|
||||
private:
|
||||
static AuroraeFactory *s_instance;
|
||||
|
||||
|
|
Loading…
Reference in New Issue