Changeset View
Changeset View
Standalone View
Standalone View
kcms/fonts/package/contents/ui/main.qml
Show First 20 Lines • Show All 74 Lines • ▼ Show 20 Line(s) | 32 | Kirigami.FormLayout { | |||
---|---|---|---|---|---|
75 | 75 | | |||
76 | Kirigami.Separator { | 76 | Kirigami.Separator { | ||
77 | Kirigami.FormData.isSection: true | 77 | Kirigami.FormData.isSection: true | ||
78 | } | 78 | } | ||
79 | 79 | | |||
80 | QtControls.ComboBox { | 80 | QtControls.ComboBox { | ||
81 | id: antiAliasingComboBox | 81 | id: antiAliasingComboBox | ||
82 | Layout.preferredWidth: formLayout.maxImplicitWidth | 82 | Layout.preferredWidth: formLayout.maxImplicitWidth | ||
83 | Kirigami.FormData.label: i18n("Use anti-aliasing:") | 83 | Kirigami.FormData.label: i18n("Font smoothing:") | ||
84 | 84 | | |||
85 | model: [i18n("Enabled"), i18n("Vendor Default"), i18n("Disabled")] | 85 | model: [i18n("Enabled"), i18n("Vendor Default"), i18n("Disabled")] | ||
86 | 86 | | |||
87 | currentIndex: kcm.fontAASettings.antiAliasing | 87 | currentIndex: kcm.fontAASettings.antiAliasing | ||
88 | onCurrentIndexChanged: kcm.fontAASettings.antiAliasing = antiAliasingComboBox.currentIndex | 88 | onCurrentIndexChanged: kcm.fontAASettings.antiAliasing = antiAliasingComboBox.currentIndex | ||
89 | | ||||
90 | hoverEnabled: true | ||||
91 | QtControls.ToolTip { | ||||
92 | text: i18n("Use anti-aliasing to smooth sharp edges for text") | ||||
93 | visible: parent.hovered | ||||
94 | delay: 1000 | ||||
95 | } | ||||
89 | } | 96 | } | ||
90 | 97 | | |||
91 | QtControls.CheckBox { | 98 | QtControls.CheckBox { | ||
92 | id: excludeCheckBox | 99 | id: excludeCheckBox | ||
93 | checked: kcm.fontAASettings.exclude | 100 | checked: kcm.fontAASettings.exclude | ||
94 | onCheckedChanged: kcm.fontAASettings.exclude = checked; | 101 | onCheckedChanged: kcm.fontAASettings.exclude = checked; | ||
95 | text: i18n("Exclude range from anti-aliasing") | 102 | text: i18n("Don't smooth fonts within this range:") | ||
96 | Layout.fillWidth: true | 103 | Layout.fillWidth: true | ||
97 | enabled: antiAliasingComboBox.currentIndex == 0 | 104 | enabled: antiAliasingComboBox.currentIndex == 0 | ||
98 | } | 105 | } | ||
99 | 106 | | |||
100 | RowLayout { | 107 | RowLayout { | ||
101 | id: excludeField | 108 | id: excludeField | ||
102 | Layout.preferredWidth: formLayout.maxImplicitWidth | 109 | Layout.preferredWidth: formLayout.maxImplicitWidth | ||
103 | enabled: antiAliasingComboBox.currentIndex == 0 | 110 | enabled: antiAliasingComboBox.currentIndex == 0 | ||
Show All 24 Lines | 133 | Connections { | |||
128 | onExcludeFromChanged: excludeFromSpinBox.value = kcm.fontAASettings.excludeFrom; | 135 | onExcludeFromChanged: excludeFromSpinBox.value = kcm.fontAASettings.excludeFrom; | ||
129 | onExcludeToChanged: excludeToSpinBox.value = kcm.fontAASettings.excludeTo; | 136 | onExcludeToChanged: excludeToSpinBox.value = kcm.fontAASettings.excludeTo; | ||
130 | } | 137 | } | ||
131 | } | 138 | } | ||
132 | 139 | | |||
133 | QtControls.ComboBox { | 140 | QtControls.ComboBox { | ||
134 | id: subPixelCombo | 141 | id: subPixelCombo | ||
135 | Layout.preferredWidth: formLayout.maxImplicitWidth | 142 | Layout.preferredWidth: formLayout.maxImplicitWidth | ||
136 | Kirigami.FormData.label: i18n("Sub-pixel rendering type:") | 143 | Kirigami.FormData.label: i18n("Sub-pixel rendering:") | ||
davidedmundson: What's the rationale of these two changes? | |||||
ngraham: 1. Reducing unnecessary string length: I didn't think "type" and "style" added anything.
2. | |||||
137 | currentIndex: kcm.fontAASettings.subPixelCurrentIndex | 144 | currentIndex: kcm.fontAASettings.subPixelCurrentIndex | ||
138 | onCurrentIndexChanged: kcm.fontAASettings.subPixelCurrentIndex = currentIndex; | 145 | onCurrentIndexChanged: kcm.fontAASettings.subPixelCurrentIndex = currentIndex; | ||
139 | model: kcm.fontAASettings.subPixelOptionsModel | 146 | model: kcm.fontAASettings.subPixelOptionsModel | ||
140 | textRole: "display" | 147 | textRole: "display" | ||
141 | enabled: antiAliasingComboBox.currentIndex == 0 | 148 | enabled: antiAliasingComboBox.currentIndex == 0 | ||
142 | popup.height: popup.implicitHeight | 149 | popup.height: popup.implicitHeight | ||
143 | delegate: QtControls.ItemDelegate { | 150 | delegate: QtControls.ItemDelegate { | ||
144 | id: subPixelDelegate | 151 | id: subPixelDelegate | ||
Show All 15 Lines | 162 | Image { | |||
160 | // With this bug, images requested from a QQuickImageProvider have an incorrect scale with devicePixelRatio != 1 when sourceSize is not set. | 167 | // With this bug, images requested from a QQuickImageProvider have an incorrect scale with devicePixelRatio != 1 when sourceSize is not set. | ||
161 | // | 168 | // | ||
162 | // TODO: Check if QTBUG-38127 is fixed and remove the next two lines. | 169 | // TODO: Check if QTBUG-38127 is fixed and remove the next two lines. | ||
163 | sourceSize.width: 1 | 170 | sourceSize.width: 1 | ||
164 | sourceSize.height: 1 | 171 | sourceSize.height: 1 | ||
165 | } | 172 | } | ||
166 | } | 173 | } | ||
167 | } | 174 | } | ||
175 | | ||||
176 | hoverEnabled: true | ||||
177 | QtControls.ToolTip { | ||||
178 | text: i18n("Use sub-pixel rendering to improve anti-aliasing appearance when the ordering of the three pixel colors (red, green, and blue) in the current display is known.") | ||||
179 | visible: parent.hovered | ||||
180 | delay: 1000 | ||||
181 | } | ||||
168 | } | 182 | } | ||
169 | 183 | | |||
170 | QtControls.ComboBox { | 184 | QtControls.ComboBox { | ||
171 | id: hintingCombo | 185 | id: hintingCombo | ||
172 | Layout.preferredWidth: formLayout.maxImplicitWidth | 186 | Layout.preferredWidth: formLayout.maxImplicitWidth | ||
173 | Kirigami.FormData.label: i18n("Hinting style:") | 187 | Kirigami.FormData.label: i18n("Hinting:") | ||
174 | currentIndex: kcm.fontAASettings.hintingCurrentIndex | 188 | currentIndex: kcm.fontAASettings.hintingCurrentIndex | ||
175 | onCurrentTextChanged: kcm.fontAASettings.hintingCurrentIndex = currentIndex; | 189 | onCurrentTextChanged: kcm.fontAASettings.hintingCurrentIndex = currentIndex; | ||
176 | model: kcm.fontAASettings.hintingOptionsModel | 190 | model: kcm.fontAASettings.hintingOptionsModel | ||
177 | textRole: "display" | 191 | textRole: "display" | ||
178 | enabled: antiAliasingComboBox.currentIndex == 0 | 192 | enabled: antiAliasingComboBox.currentIndex == 0 | ||
179 | popup.height: popup.implicitHeight | 193 | popup.height: popup.implicitHeight | ||
180 | delegate: QtControls.ItemDelegate { | 194 | delegate: QtControls.ItemDelegate { | ||
181 | id: hintingDelegate | 195 | id: hintingDelegate | ||
Show All 15 Lines | 206 | Image { | |||
197 | // With this bug, images requested from a QQuickImageProvider have an incorrect scale with devicePixelRatio != 1 when sourceSize is not set. | 211 | // With this bug, images requested from a QQuickImageProvider have an incorrect scale with devicePixelRatio != 1 when sourceSize is not set. | ||
198 | // | 212 | // | ||
199 | // TODO: Check if QTBUG-38127 is fixed and remove the next two lines. | 213 | // TODO: Check if QTBUG-38127 is fixed and remove the next two lines. | ||
200 | sourceSize.width: 1 | 214 | sourceSize.width: 1 | ||
201 | sourceSize.height: 1 | 215 | sourceSize.height: 1 | ||
202 | } | 216 | } | ||
203 | } | 217 | } | ||
204 | } | 218 | } | ||
219 | | ||||
220 | QtControls.ToolTip { | ||||
221 | text: i18n("Type of sub-pixel rendering to use. Choose a style that corresponds to the order of your display's pixel grid. For example, choose RGB hinting if your display that has the pixels ordered red, green, blue (read left to right).") | ||||
This is wrong. The hinting style option is independent from sub-pixel rendering. There are five hinting algorithms in freetype:
But some of them only make sense in combination with other settings, e.g. FT_LOAD_TARGET_MONO would only be used when anti-aliasing is turned off and FT_LOAD_TARGET_LCD_V would imply that sub-pixel rendering is activated and you display is turned vertically (vrgb or vbgr). The hintingstyle (as in fontconfig/Xft) would then be mapped to one of these hinting algorithms or turn off hinting at all. harmathy: This is wrong. The hinting style option is independent from sub-pixel rendering.
There are… | |||||
222 | visible: parent.hovered | ||||
223 | delay: 1000 | ||||
224 | } | ||||
205 | } | 225 | } | ||
206 | 226 | | |||
207 | RowLayout { | 227 | RowLayout { | ||
208 | QtControls.CheckBox { | 228 | QtControls.CheckBox { | ||
209 | id: dpiCheckBox | 229 | id: dpiCheckBox | ||
210 | checked: kcm.fontAASettings.dpi != 0 | 230 | checked: kcm.fontAASettings.dpi != 0 | ||
211 | text: i18n("Force Fonts DPI:") | 231 | text: i18n("Force Fonts DPI:") | ||
212 | } | 232 | } | ||
Show All 35 Lines |
What's the rationale of these two changes?