Merge branch 'Plasma/5.5'

icc-effect-5.14.5
Martin Gräßlin 2016-02-25 08:07:30 +01:00
commit 5acf9abda8
3 changed files with 11 additions and 0 deletions

View File

@ -172,9 +172,16 @@ void DecorationOptions::setDecoration(KDecoration2::Decoration *decoration)
disconnect(s.data(), &KDecoration2::DecorationSettings::fontChanged, this, &DecorationOptions::fontChanged);
disconnect(s.data(), &KDecoration2::DecorationSettings::decorationButtonsLeftChanged, this, &DecorationOptions::titleButtonsChanged);
disconnect(s.data(), &KDecoration2::DecorationSettings::decorationButtonsRightChanged, this, &DecorationOptions::titleButtonsChanged);
disconnect(m_paletteConnection);
}
m_decoration = decoration;
connect(m_decoration->client().data(), &KDecoration2::DecoratedClient::activeChanged, this, &DecorationOptions::slotActiveChanged);
m_paletteConnection = connect(m_decoration->client().data(), &KDecoration2::DecoratedClient::paletteChanged, this,
[this] (const QPalette &pal) {
m_colors.update(pal);
emit colorsChanged();
}
);
auto s = m_decoration->settings();
connect(s.data(), &KDecoration2::DecorationSettings::fontChanged, this, &DecorationOptions::fontChanged);
connect(s.data(), &KDecoration2::DecorationSettings::decorationButtonsLeftChanged, this, &DecorationOptions::titleButtonsChanged);

View File

@ -244,6 +244,7 @@ private:
bool m_active;
KDecoration2::Decoration *m_decoration;
ColorSettings m_colors;
QMetaObject::Connection m_paletteConnection;
};
class Borders : public QObject

View File

@ -278,6 +278,9 @@ KWIN_EXPORT int kdemain(int argc, char * argv[])
setenv("QT_QPA_PLATFORM", "xcb", true);
qunsetenv("QT_DEVICE_PIXEL_RATIO");
#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0))
QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling);
#endif
KWin::ApplicationX11 a(argc, argv);
a.setupTranslator();