Changeset View
Changeset View
Standalone View
Standalone View
kcms/fonts/fonts.cpp
Show First 20 Lines • Show All 131 Lines • ▼ Show 20 Line(s) | 131 | if (xft.getExcludeRange(from, to)) { | |||
---|---|---|---|---|---|
132 | m_excludeFrom = from; | 132 | m_excludeFrom = from; | ||
133 | m_excludeTo = to; | 133 | m_excludeTo = to; | ||
134 | setExclude(true); | 134 | setExclude(true); | ||
135 | } else { | 135 | } else { | ||
136 | m_excludeFrom = 8; | 136 | m_excludeFrom = 8; | ||
137 | m_excludeTo = 15; | 137 | m_excludeTo = 15; | ||
138 | setExclude(false); | 138 | setExclude(false); | ||
139 | } | 139 | } | ||
140 | m_excludeOriginal = m_exclude; | ||||
140 | m_excludeFromOriginal = m_excludeFrom; | 141 | m_excludeFromOriginal = m_excludeFrom; | ||
141 | m_excludeToOriginal = m_excludeTo; | 142 | m_excludeToOriginal = m_excludeTo; | ||
142 | excludeToChanged(); | 143 | excludeToChanged(); | ||
143 | excludeFromChanged(); | 144 | excludeFromChanged(); | ||
144 | 145 | | |||
145 | KXftConfig::SubPixel::Type spType; | 146 | KXftConfig::SubPixel::Type spType; | ||
146 | xft.getSubPixelType(spType); | 147 | xft.getSubPixelType(spType); | ||
147 | 148 | | |||
▲ Show 20 Lines • Show All 268 Lines • ▼ Show 20 Line(s) | |||||
416 | 417 | | |||
417 | int FontAASettings::hintingCurrentIndex() | 418 | int FontAASettings::hintingCurrentIndex() | ||
418 | { | 419 | { | ||
419 | return m_hintingCurrentIndex; | 420 | return m_hintingCurrentIndex; | ||
420 | } | 421 | } | ||
421 | 422 | | |||
422 | bool FontAASettings::needsSave() const | 423 | bool FontAASettings::needsSave() const | ||
423 | { | 424 | { | ||
424 | return m_excludeTo != m_excludeToOriginal | 425 | return m_exclude != m_excludeOriginal | ||
426 | || m_excludeTo != m_excludeToOriginal | ||||
425 | || m_excludeFrom != m_excludeFromOriginal | 427 | || m_excludeFrom != m_excludeFromOriginal | ||
426 | || m_antiAliasing != m_antiAliasingOriginal | 428 | || m_antiAliasing != m_antiAliasingOriginal | ||
427 | || m_dpi != m_dpiOriginal | 429 | || m_dpi != m_dpiOriginal | ||
428 | || m_subPixelCurrentIndex != m_subPixelCurrentIndexOriginal | 430 | || m_subPixelCurrentIndex != m_subPixelCurrentIndexOriginal | ||
429 | || m_hintingCurrentIndex != m_hintingCurrentIndexOriginal; | 431 | || m_hintingCurrentIndex != m_hintingCurrentIndexOriginal; | ||
430 | } | 432 | } | ||
431 | 433 | | |||
432 | 434 | | |||
Show All 12 Lines | 440 | { | |||
445 | setButtons(Apply | Default); | 447 | setButtons(Apply | Default); | ||
446 | 448 | | |||
447 | auto updateState = [this]() { | 449 | auto updateState = [this]() { | ||
448 | setNeedsSave(m_fontAASettings->needsSave()); | 450 | setNeedsSave(m_fontAASettings->needsSave()); | ||
449 | }; | 451 | }; | ||
450 | 452 | | |||
451 | connect(m_fontAASettings, &FontAASettings::subPixelCurrentIndexChanged, this, updateState); | 453 | connect(m_fontAASettings, &FontAASettings::subPixelCurrentIndexChanged, this, updateState); | ||
452 | connect(m_fontAASettings, &FontAASettings::hintingCurrentIndexChanged, this, updateState); | 454 | connect(m_fontAASettings, &FontAASettings::hintingCurrentIndexChanged, this, updateState); | ||
455 | connect(m_fontAASettings, &FontAASettings::excludeChanged, this, updateState); | ||||
456 | connect(m_fontAASettings, &FontAASettings::excludeFromChanged, this, updateState); | ||||
453 | connect(m_fontAASettings, &FontAASettings::excludeToChanged, this, updateState); | 457 | connect(m_fontAASettings, &FontAASettings::excludeToChanged, this, updateState); | ||
454 | connect(m_fontAASettings, &FontAASettings::antiAliasingChanged, this, updateState); | 458 | connect(m_fontAASettings, &FontAASettings::antiAliasingChanged, this, updateState); | ||
455 | connect(m_fontAASettings, &FontAASettings::aliasingChanged, this, updateState); | 459 | connect(m_fontAASettings, &FontAASettings::aliasingChanged, this, updateState); | ||
456 | connect(m_fontAASettings, &FontAASettings::dpiChanged, this, updateState); | 460 | connect(m_fontAASettings, &FontAASettings::dpiChanged, this, updateState); | ||
457 | } | 461 | } | ||
458 | 462 | | |||
459 | KFonts::~KFonts() | 463 | KFonts::~KFonts() | ||
460 | { | 464 | { | ||
▲ Show 20 Lines • Show All 251 Lines • Show Last 20 Lines |