Changeset View
Changeset View
Standalone View
Standalone View
kcms/fonts/fonts.cpp
Show First 20 Lines • Show All 602 Lines • ▼ Show 20 Line(s) | |||||
603 | 603 | | |||
604 | void KFonts::adjustAllFonts() | 604 | void KFonts::adjustAllFonts() | ||
605 | { | 605 | { | ||
606 | QFont font = m_settings->font(); | 606 | QFont font = m_settings->font(); | ||
607 | KFontChooser::FontDiffFlags fontDiffFlags; | 607 | KFontChooser::FontDiffFlags fontDiffFlags; | ||
608 | int ret = KFontDialog::getFontDiff(font, fontDiffFlags, KFontChooser::NoDisplayFlags); | 608 | int ret = KFontDialog::getFontDiff(font, fontDiffFlags, KFontChooser::NoDisplayFlags); | ||
609 | 609 | | |||
610 | if (ret == KDialog::Accepted && fontDiffFlags) { | 610 | if (ret == KDialog::Accepted && fontDiffFlags) { | ||
611 | if (!m_settings->isImmutable("font")) { | ||||
611 | m_settings->setFont(applyFontDiff(m_settings->font(), font, fontDiffFlags)); | 612 | m_settings->setFont(applyFontDiff(m_settings->font(), font, fontDiffFlags)); | ||
613 | } | ||||
614 | if (!m_settings->isImmutable("menuFont")) { | ||||
612 | m_settings->setMenuFont(applyFontDiff(m_settings->menuFont(), font, fontDiffFlags)); | 615 | m_settings->setMenuFont(applyFontDiff(m_settings->menuFont(), font, fontDiffFlags)); | ||
616 | } | ||||
617 | if (!m_settings->isImmutable("toolBarFont")) { | ||||
613 | m_settings->setToolBarFont(applyFontDiff(m_settings->toolBarFont(), font, fontDiffFlags)); | 618 | m_settings->setToolBarFont(applyFontDiff(m_settings->toolBarFont(), font, fontDiffFlags)); | ||
619 | } | ||||
620 | if (!m_settings->isImmutable("activeFont")) { | ||||
614 | m_settings->setActiveFont(applyFontDiff(m_settings->activeFont(), font, fontDiffFlags)); | 621 | m_settings->setActiveFont(applyFontDiff(m_settings->activeFont(), font, fontDiffFlags)); | ||
622 | } | ||||
623 | if (!m_settings->isImmutable("smallestReadableFont")) { | ||||
615 | m_settings->setSmallestReadableFont(applyFontDiff(m_settings->smallestReadableFont(), font, fontDiffFlags)); | 624 | m_settings->setSmallestReadableFont(applyFontDiff(m_settings->smallestReadableFont(), font, fontDiffFlags)); | ||
625 | } | ||||
616 | const QFont adjustedFont = applyFontDiff(m_settings->fixed(), font, fontDiffFlags); | 626 | const QFont adjustedFont = applyFontDiff(m_settings->fixed(), font, fontDiffFlags); | ||
617 | if (QFontInfo(adjustedFont).fixedPitch()) { | 627 | if (QFontInfo(adjustedFont).fixedPitch() && !m_settings->isImmutable("fixed")) { | ||
618 | m_settings->setFixed(adjustedFont); | 628 | m_settings->setFixed(adjustedFont); | ||
619 | } | 629 | } | ||
620 | } | 630 | } | ||
621 | } | 631 | } | ||
622 | 632 | | |||
623 | QFont KFonts::applyFontDiff(const QFont &fnt, const QFont &newFont, int fontDiffFlags) | 633 | QFont KFonts::applyFontDiff(const QFont &fnt, const QFont &newFont, int fontDiffFlags) | ||
624 | { | 634 | { | ||
625 | QFont font(fnt); | 635 | QFont font(fnt); | ||
Show All 19 Lines |