Changeset View
Changeset View
Standalone View
Standalone View
decorations/settings.cpp
Show All 24 Lines | |||||
25 | #include "appmenu.h" | 25 | #include "appmenu.h" | ||
26 | 26 | | |||
27 | #include <config-kwin.h> | 27 | #include <config-kwin.h> | ||
28 | 28 | | |||
29 | #include <KDecoration2/DecorationSettings> | 29 | #include <KDecoration2/DecorationSettings> | ||
30 | 30 | | |||
31 | #include <KConfigGroup> | 31 | #include <KConfigGroup> | ||
32 | 32 | | |||
33 | #include <QFontDatabase> | ||||
34 | | ||||
33 | namespace KWin | 35 | namespace KWin | ||
34 | { | 36 | { | ||
35 | namespace Decoration | 37 | namespace Decoration | ||
36 | { | 38 | { | ||
37 | SettingsImpl::SettingsImpl(KDecoration2::DecorationSettings *parent) | 39 | SettingsImpl::SettingsImpl(KDecoration2::DecorationSettings *parent) | ||
38 | : QObject() | 40 | : QObject() | ||
39 | , DecorationSettingsPrivate(parent) | 41 | , DecorationSettingsPrivate(parent) | ||
40 | , m_borderSize(KDecoration2::BorderSize::Normal) | 42 | , m_borderSize(KDecoration2::BorderSize::Normal) | ||
▲ Show 20 Lines • Show All 137 Lines • ▼ Show 20 Line(s) | 179 | if (close != m_closeDoubleClickMenu) { | |||
178 | m_closeDoubleClickMenu = close; | 180 | m_closeDoubleClickMenu = close; | ||
179 | emit decorationSettings()->closeOnDoubleClickOnMenuChanged(m_closeDoubleClickMenu); | 181 | emit decorationSettings()->closeOnDoubleClickOnMenuChanged(m_closeDoubleClickMenu); | ||
180 | } | 182 | } | ||
181 | const auto size = stringToSize(config.readEntry("BorderSize", QStringLiteral("Normal"))); | 183 | const auto size = stringToSize(config.readEntry("BorderSize", QStringLiteral("Normal"))); | ||
182 | if (size != m_borderSize) { | 184 | if (size != m_borderSize) { | ||
183 | m_borderSize = size; | 185 | m_borderSize = size; | ||
184 | emit decorationSettings()->borderSizeChanged(m_borderSize); | 186 | emit decorationSettings()->borderSizeChanged(m_borderSize); | ||
185 | } | 187 | } | ||
188 | const QFont font = QFontDatabase::systemFont(QFontDatabase::TitleFont); | ||||
189 | if (font != m_font) { | ||||
190 | m_font = font; | ||||
191 | emit decorationSettings()->fontChanged(m_font); | ||||
192 | } | ||||
186 | 193 | | |||
187 | emit decorationSettings()->reconfigured(); | 194 | emit decorationSettings()->reconfigured(); | ||
188 | } | 195 | } | ||
189 | 196 | | |||
190 | } | 197 | } | ||
191 | } | 198 | } |