Changeset View
Changeset View
Standalone View
Standalone View
kcms/fonts/fonts.cpp
Show First 20 Lines • Show All 144 Lines • ▼ Show 20 Line(s) | 142 | } else { | |||
---|---|---|---|---|---|
145 | setExclude(false); | 145 | setExclude(false); | ||
146 | } | 146 | } | ||
147 | m_originalState.exclude = m_state.exclude; | 147 | m_originalState.exclude = m_state.exclude; | ||
148 | m_originalState.excludeFrom = m_state.excludeFrom; | 148 | m_originalState.excludeFrom = m_state.excludeFrom; | ||
149 | m_originalState.excludeTo = m_state.excludeTo; | 149 | m_originalState.excludeTo = m_state.excludeTo; | ||
150 | excludeToChanged(); | 150 | excludeToChanged(); | ||
151 | excludeFromChanged(); | 151 | excludeFromChanged(); | ||
152 | 152 | | |||
153 | KXftConfig::SubPixel::Type spType; | 153 | // start with empty subpixel type | ||
154 | if (!xft.getSubPixelType(spType) || KXftConfig::SubPixel::NotSet == spType) { | 154 | KXftConfig::SubPixel::Type spType = KXftConfig::SubPixel::NotSet; | ||
155 | // get subpixel type from config | ||||
156 | xft.getSubPixelType(spType); | ||||
157 | m_originalState.subPixel = spType; | ||||
158 | // if it is not set, we set it to rgb | ||||
159 | if (spType == KXftConfig::SubPixel::NotSet) { | ||||
155 | spType = KXftConfig::SubPixel::Rgb; | 160 | spType = KXftConfig::SubPixel::Rgb; | ||
156 | } | 161 | } | ||
157 | | ||||
158 | setSubPixel(spType); | 162 | setSubPixel(spType); | ||
159 | m_originalState.subPixel = spType; | | |||
160 | m_state.subPixelHasLocalConfig = xft.subPixelTypeHasLocalConfig(); | 163 | m_state.subPixelHasLocalConfig = xft.subPixelTypeHasLocalConfig(); | ||
161 | 164 | | |||
162 | KXftConfig::Hint::Style hStyle; | 165 | // start with empty hint style | ||
163 | 166 | KXftConfig::Hint::Style hStyle = KXftConfig::Hint::NotSet; | |||
164 | if (!xft.getHintStyle(hStyle) || KXftConfig::Hint::NotSet == hStyle) { | 167 | // get value from config; | ||
168 | xft.getHintStyle(hStyle); | ||||
169 | m_originalState.hinting = hStyle; | ||||
170 | // if it is not set, we set it to slight hinting | ||||
171 | if (hStyle == KXftConfig::Hint::NotSet) { | ||||
165 | hStyle = KXftConfig::Hint::Slight; | 172 | hStyle = KXftConfig::Hint::Slight; | ||
166 | } | 173 | } | ||
167 | | ||||
168 | setHinting(hStyle); | 174 | setHinting(hStyle); | ||
169 | m_originalState.hinting = hStyle; | | |||
170 | m_state.hintingHasLocalConfig = xft.hintStyleHasLocalConfig(); | 175 | m_state.hintingHasLocalConfig = xft.hintStyleHasLocalConfig(); | ||
171 | 176 | | |||
172 | KConfig _cfgfonts("kcmfonts"); | 177 | KConfig _cfgfonts("kcmfonts"); | ||
173 | KConfigGroup cfgfonts(&_cfgfonts, "General"); | 178 | KConfigGroup cfgfonts(&_cfgfonts, "General"); | ||
174 | 179 | | |||
175 | int dpicfg; | 180 | int dpicfg; | ||
176 | if (KWindowSystem::isPlatformWayland()) { | 181 | if (KWindowSystem::isPlatformWayland()) { | ||
177 | dpicfg = cfgfonts.readEntry("forceFontDPIWayland", 0); | 182 | dpicfg = cfgfonts.readEntry("forceFontDPIWayland", 0); | ||
▲ Show 20 Lines • Show All 471 Lines • Show Last 20 Lines |