Changeset View
Changeset View
Standalone View
Standalone View
kcms/fonts/fonts.cpp
Show First 20 Lines • Show All 219 Lines • ▼ Show 20 Line(s) | 208 | #if HAVE_X11 | |||
---|---|---|---|---|---|
220 | } | 220 | } | ||
221 | QApplication::processEvents(); | 221 | QApplication::processEvents(); | ||
222 | #endif | 222 | #endif | ||
223 | 223 | | |||
224 | 224 | | |||
225 | KGlobalSettings::self()->emitChange(KGlobalSettings::FontChanged); | 225 | KGlobalSettings::self()->emitChange(KGlobalSettings::FontChanged); | ||
226 | 226 | | |||
227 | runRdb(KRdbExportXftSettings | KRdbExportGtkTheme); | 227 | runRdb(KRdbExportXftSettings | KRdbExportGtkTheme); | ||
228 | | ||||
229 | emit fontsHaveChanged(); | | |||
ngraham: Nothing was previously listening for this signal, so I believe it is safe to repurpose it for… | |||||
230 | } | 228 | } | ||
231 | 229 | | |||
232 | void KFonts::adjustFont(const QFont &font, const QString &category) | 230 | void KFonts::adjustFont(const QFont &font, const QString &category) | ||
233 | { | 231 | { | ||
234 | QFont selFont = font; | 232 | QFont selFont = font; | ||
235 | int ret = KFontChooserDialog::getFont(selFont, KFontChooser::NoDisplayFlags); | 233 | int ret = KFontChooserDialog::getFont(selFont, KFontChooser::NoDisplayFlags); | ||
236 | 234 | | |||
237 | if (ret == QDialog::Accepted) { | 235 | if (ret == QDialog::Accepted) { | ||
238 | if (category == QLatin1String("font")) { | 236 | if (category == QLatin1String("font")) { | ||
239 | m_settings->setFont(selFont); | 237 | m_settings->setFont(selFont); | ||
240 | } else if (category == QLatin1String("menuFont")) { | 238 | } else if (category == QLatin1String("menuFont")) { | ||
241 | m_settings->setMenuFont(selFont); | 239 | m_settings->setMenuFont(selFont); | ||
242 | } else if (category == QLatin1String("toolBarFont")) { | 240 | } else if (category == QLatin1String("toolBarFont")) { | ||
243 | m_settings->setToolBarFont(selFont); | 241 | m_settings->setToolBarFont(selFont); | ||
244 | } else if (category == QLatin1String("activeFont")) { | 242 | } else if (category == QLatin1String("activeFont")) { | ||
245 | m_settings->setActiveFont(selFont); | 243 | m_settings->setActiveFont(selFont); | ||
246 | } else if (category == QLatin1String("smallestReadableFont")) { | 244 | } else if (category == QLatin1String("smallestReadableFont")) { | ||
247 | m_settings->setSmallestReadableFont(selFont); | 245 | m_settings->setSmallestReadableFont(selFont); | ||
248 | } else if (category == QLatin1String("fixed")) { | 246 | } else if (category == QLatin1String("fixed")) { | ||
249 | m_settings->setFixed(selFont); | 247 | m_settings->setFixed(selFont); | ||
250 | } | 248 | } | ||
251 | } | 249 | } | ||
250 | emit fontsHaveChanged(); | ||||
252 | } | 251 | } | ||
253 | 252 | | |||
254 | void KFonts::adjustAllFonts() | 253 | void KFonts::adjustAllFonts() | ||
255 | { | 254 | { | ||
256 | QFont font = m_settings->font(); | 255 | QFont font = m_settings->font(); | ||
257 | KFontChooser::FontDiffFlags fontDiffFlags; | 256 | KFontChooser::FontDiffFlags fontDiffFlags; | ||
258 | int ret = KFontChooserDialog::getFontDiff(font, fontDiffFlags, KFontChooser::NoDisplayFlags); | 257 | int ret = KFontChooserDialog::getFontDiff(font, fontDiffFlags, KFontChooser::NoDisplayFlags); | ||
259 | 258 | | |||
▲ Show 20 Lines • Show All 56 Lines • Show Last 20 Lines |
Nothing was previously listening for this signal, so I believe it is safe to repurpose it for something else as I have done in this patch.