Changeset View
Changeset View
Standalone View
Standalone View
kcms/fonts/package/contents/ui/main.qml
Show All 25 Lines | |||||
26 | 26 | | |||
27 | KCM.SimpleKCM { | 27 | KCM.SimpleKCM { | ||
28 | id: root | 28 | id: root | ||
29 | 29 | | |||
30 | KCM.ConfigModule.quickHelp: i18n("This module lets you configure the system fonts.") | 30 | KCM.ConfigModule.quickHelp: i18n("This module lets you configure the system fonts.") | ||
31 | 31 | | |||
32 | Kirigami.FormLayout { | 32 | Kirigami.FormLayout { | ||
33 | id: formLayout | 33 | id: formLayout | ||
34 | readonly property int maxImplicitWidth: Math.max(adjustAllFontsButton.implicitWidth, Math.max(antiAliasingComboBox.implicitWidth, Math.max(excludeField.implicitWidth, Math.max(subPixelCombo.implicitWidth, hintingCombo.implicitWidth)))) | 34 | readonly property int maxImplicitWidth: Math.max(adjustAllFontsButton.implicitWidth, excludeField.implicitWidth, subPixelCombo.implicitWidth, hintingCombo.implicitWidth) | ||
35 | 35 | | |||
36 | QtControls.Button { | 36 | QtControls.Button { | ||
37 | id: adjustAllFontsButton | 37 | id: adjustAllFontsButton | ||
38 | Layout.preferredWidth: formLayout.maxImplicitWidth | 38 | Layout.preferredWidth: formLayout.maxImplicitWidth | ||
39 | icon.name: "font-select-symbolic" | 39 | icon.name: "font-select-symbolic" | ||
40 | text: i18n("&Adjust All Fonts...") | 40 | text: i18n("&Adjust All Fonts...") | ||
41 | 41 | | |||
42 | onClicked: kcm.adjustAllFonts(); | 42 | onClicked: kcm.adjustAllFonts(); | ||
Show All 30 Lines | 71 | FontWidget { | |||
73 | category: "windowTitleFont" | 73 | category: "windowTitleFont" | ||
74 | font: kcm.windowTitleFont | 74 | font: kcm.windowTitleFont | ||
75 | } | 75 | } | ||
76 | 76 | | |||
77 | Kirigami.Separator { | 77 | Kirigami.Separator { | ||
78 | Kirigami.FormData.isSection: true | 78 | Kirigami.FormData.isSection: true | ||
79 | } | 79 | } | ||
80 | 80 | | |||
81 | QtControls.ComboBox { | 81 | QtControls.CheckBox { | ||
82 | id: antiAliasingComboBox | 82 | id: antiAliasingCheckBox | ||
83 | Layout.preferredWidth: formLayout.maxImplicitWidth | 83 | checked: kcm.fontAASettings.antiAliasing | ||
84 | Kirigami.FormData.label: i18nc("Used as a noun, and precedes a combobox full of options", "Anti-aliasing:") | 84 | onCheckedChanged: kcm.fontAASettings.antiAliasing = checked | ||
85 | 85 | Kirigami.FormData.label: i18n("Anti-Aliasing:") | |||
86 | model: [i18n("Enabled"), i18n("Vendor default"), i18n("Disabled")] | 86 | text: i18n("Enable") | ||
87 | 87 | Layout.fillWidth: true | |||
88 | currentIndex: kcm.fontAASettings.antiAliasing | | |||
89 | onCurrentIndexChanged: kcm.fontAASettings.antiAliasing = antiAliasingComboBox.currentIndex | | |||
90 | } | 88 | } | ||
91 | 89 | | |||
92 | QtControls.CheckBox { | 90 | QtControls.CheckBox { | ||
93 | id: excludeCheckBox | 91 | id: excludeCheckBox | ||
94 | checked: kcm.fontAASettings.exclude | 92 | checked: kcm.fontAASettings.exclude | ||
95 | onCheckedChanged: kcm.fontAASettings.exclude = checked; | 93 | onCheckedChanged: kcm.fontAASettings.exclude = checked; | ||
96 | text: i18n("Exclude range from anti-aliasing") | 94 | text: i18n("Exclude range from anti-aliasing") | ||
97 | Layout.fillWidth: true | 95 | Layout.fillWidth: true | ||
98 | enabled: antiAliasingComboBox.currentIndex == 0 | 96 | enabled: antiAliasingCheckBox.checked | ||
99 | } | 97 | } | ||
100 | 98 | | |||
101 | RowLayout { | 99 | RowLayout { | ||
102 | id: excludeField | 100 | id: excludeField | ||
103 | enabled: antiAliasingComboBox.currentIndex == 0 | 101 | Layout.preferredWidth: formLayout.maxImplicitWidth | ||
104 | 102 | enabled: antiAliasingCheckBox.checked | |||
105 | Item { | | |||
106 | width: units.largeSpacing | | |||
107 | } | | |||
108 | | ||||
109 | QtControls.SpinBox { | 103 | QtControls.SpinBox { | ||
110 | id: excludeFromSpinBox | 104 | id: excludeFromSpinBox | ||
111 | stepSize: 1 | 105 | stepSize: 1 | ||
112 | onValueChanged: kcm.fontAASettings.excludeFrom = value | 106 | onValueChanged: kcm.fontAASettings.excludeFrom = value | ||
113 | textFromValue: function(value, locale) { return i18n("%1 pt", value)} | 107 | textFromValue: function(value, locale) { return i18n("%1 pt", value)} | ||
114 | enabled: excludeCheckBox.checked | 108 | enabled: excludeCheckBox.checked | ||
115 | } | 109 | } | ||
116 | 110 | | |||
Show All 21 Lines | |||||
138 | QtControls.ComboBox { | 132 | QtControls.ComboBox { | ||
139 | id: subPixelCombo | 133 | id: subPixelCombo | ||
140 | Layout.preferredWidth: formLayout.maxImplicitWidth | 134 | Layout.preferredWidth: formLayout.maxImplicitWidth | ||
141 | Kirigami.FormData.label: i18nc("Used as a noun, and precedes a combobox full of options", "Sub-pixel rendering:") | 135 | Kirigami.FormData.label: i18nc("Used as a noun, and precedes a combobox full of options", "Sub-pixel rendering:") | ||
142 | currentIndex: kcm.fontAASettings.subPixelCurrentIndex | 136 | currentIndex: kcm.fontAASettings.subPixelCurrentIndex | ||
143 | onCurrentIndexChanged: kcm.fontAASettings.subPixelCurrentIndex = currentIndex; | 137 | onCurrentIndexChanged: kcm.fontAASettings.subPixelCurrentIndex = currentIndex; | ||
144 | model: kcm.fontAASettings.subPixelOptionsModel | 138 | model: kcm.fontAASettings.subPixelOptionsModel | ||
145 | textRole: "display" | 139 | textRole: "display" | ||
146 | enabled: antiAliasingComboBox.currentIndex == 0 | 140 | enabled: antiAliasingCheckBox.checked | ||
147 | popup.height: popup.implicitHeight | 141 | popup.height: popup.implicitHeight | ||
148 | delegate: QtControls.ItemDelegate { | 142 | delegate: QtControls.ItemDelegate { | ||
149 | id: subPixelDelegate | 143 | id: subPixelDelegate | ||
150 | onWidthChanged: { | 144 | onWidthChanged: { | ||
151 | subPixelCombo.popup.width = Math.max(subPixelCombo.popup.width, width) | 145 | subPixelCombo.popup.width = Math.max(subPixelCombo.popup.width, width) | ||
152 | } | 146 | } | ||
153 | contentItem: ColumnLayout { | 147 | contentItem: ColumnLayout { | ||
154 | id: subPixelLayout | 148 | id: subPixelLayout | ||
Show All 20 Lines | |||||
175 | QtControls.ComboBox { | 169 | QtControls.ComboBox { | ||
176 | id: hintingCombo | 170 | id: hintingCombo | ||
177 | Layout.preferredWidth: formLayout.maxImplicitWidth | 171 | Layout.preferredWidth: formLayout.maxImplicitWidth | ||
178 | Kirigami.FormData.label: i18nc("Used as a noun, and precedes a combobox full of options", "Hinting:") | 172 | Kirigami.FormData.label: i18nc("Used as a noun, and precedes a combobox full of options", "Hinting:") | ||
179 | currentIndex: kcm.fontAASettings.hintingCurrentIndex | 173 | currentIndex: kcm.fontAASettings.hintingCurrentIndex | ||
180 | onCurrentTextChanged: kcm.fontAASettings.hintingCurrentIndex = currentIndex; | 174 | onCurrentTextChanged: kcm.fontAASettings.hintingCurrentIndex = currentIndex; | ||
181 | model: kcm.fontAASettings.hintingOptionsModel | 175 | model: kcm.fontAASettings.hintingOptionsModel | ||
182 | textRole: "display" | 176 | textRole: "display" | ||
183 | enabled: antiAliasingComboBox.currentIndex == 0 | 177 | enabled: antiAliasingCheckBox.checked | ||
184 | popup.height: popup.implicitHeight | 178 | popup.height: popup.implicitHeight | ||
185 | delegate: QtControls.ItemDelegate { | 179 | delegate: QtControls.ItemDelegate { | ||
186 | id: hintingDelegate | 180 | id: hintingDelegate | ||
187 | onWidthChanged: { | 181 | onWidthChanged: { | ||
188 | hintingCombo.popup.width = Math.max(hintingCombo.popup.width, width) | 182 | hintingCombo.popup.width = Math.max(hintingCombo.popup.width, width) | ||
189 | } | 183 | } | ||
190 | contentItem: ColumnLayout { | 184 | contentItem: ColumnLayout { | ||
191 | id: hintingLayout | 185 | id: hintingLayout | ||
▲ Show 20 Lines • Show All 61 Lines • Show Last 20 Lines |