Changeset View
Changeset View
Standalone View
Standalone View
kcms/fonts/package/contents/ui/main.qml
Show First 20 Lines • Show All 93 Lines • ▼ Show 20 Line(s) | 93 | Kirigami.FormLayout { | |||
---|---|---|---|---|---|
94 | 94 | | |||
95 | id: advancedFormLayout | 95 | id: advancedFormLayout | ||
96 | readonly property int maxImplicitWidth: Math.max(adjustAllFontsButton.implicitWidth, subPixelCombo.implicitWidth, hintingCombo.implicitWidth) | 96 | readonly property int maxImplicitWidth: Math.max(adjustAllFontsButton.implicitWidth, subPixelCombo.implicitWidth, hintingCombo.implicitWidth) | ||
97 | 97 | | |||
98 | QtControls.ButtonGroup { | 98 | QtControls.ButtonGroup { | ||
99 | id: antiAliasingGroup | 99 | id: antiAliasingGroup | ||
100 | } | 100 | } | ||
101 | QtControls.RadioButton { | 101 | QtControls.RadioButton { | ||
102 | Kirigami.FormData.label: i18n("Anti-Aliasing:") | | |||
103 | text: "Vendor Default" | | |||
104 | QtControls.ButtonGroup.group: antiAliasingGroup | | |||
105 | onCheckedChanged: { | | |||
106 | if(checked) { | | |||
107 | kcm.fontAASettings.antiAliasing = 1 | | |||
108 | } | | |||
109 | } | | |||
110 | checked: kcm.fontAASettings.antiAliasing == 1 | | |||
111 | } | | |||
112 | QtControls.RadioButton { | | |||
113 | text: "Enabled" | 102 | text: "Enabled" | ||
103 | Kirigami.FormData.label: i18n("Anti-Aliasing:") | ||||
114 | QtControls.ButtonGroup.group: antiAliasingGroup | 104 | QtControls.ButtonGroup.group: antiAliasingGroup | ||
115 | onCheckedChanged: { | 105 | onCheckedChanged: { | ||
116 | if(checked) { | 106 | if(checked) { | ||
117 | kcm.fontAASettings.antiAliasing = 0 | 107 | kcm.fontAASettings.antiAliasing = 0 | ||
118 | } | 108 | } | ||
119 | } | 109 | } | ||
120 | checked: kcm.fontAASettings.antiAliasing == 0 | 110 | checked: (kcm.fontAASettings.antiAliasing == 0 && !kcm.fontAASettings.exclude) || kcm.fontAASettings.antiAliasing == 1 | ||
121 | } | 111 | } | ||
122 | RowLayout { | 112 | RowLayout { | ||
123 | QtControls.RadioButton{ | 113 | QtControls.RadioButton{ | ||
124 | id: excludeRadioButton | 114 | id: excludeRadioButton | ||
125 | QtControls.ButtonGroup.group: antiAliasingGroup | 115 | QtControls.ButtonGroup.group: antiAliasingGroup | ||
126 | text: "Disabled from " | 116 | text: "Disabled from " | ||
127 | onCheckedChanged: { | 117 | onCheckedChanged: { | ||
128 | if(checked) { | 118 | if(checked) { | ||
129 | kcm.fontAASettings.antiAliasing = 0 | 119 | kcm.fontAASettings.antiAliasing = 0 | ||
130 | } | 120 | } | ||
131 | kcm.fontAASettings.exclude = checked | 121 | kcm.fontAASettings.exclude = checked | ||
132 | } | 122 | } | ||
133 | checked: kcm.fontAASettings.antiAliasing == 0 | 123 | checked: kcm.fontAASettings.antiAliasing == 0 && kcm.fontAASettings.exclude | ||
134 | } | 124 | } | ||
135 | QtControls.SpinBox { | 125 | QtControls.SpinBox { | ||
136 | id: excludeFromSpinBox | 126 | id: excludeFromSpinBox | ||
137 | enabled: excludeRadioButton.checked | 127 | enabled: excludeRadioButton.checked | ||
138 | stepSize: 1 | 128 | stepSize: 1 | ||
139 | onValueChanged: kcm.fontAASettings.excludeFrom = value | 129 | onValueChanged: kcm.fontAASettings.excludeFrom = value | ||
140 | textFromValue: function(value, locale) { return i18n("%1 pt", value)} | 130 | textFromValue: function(value, locale) { return i18n("%1 pt", value)} | ||
141 | } | 131 | } | ||
▲ Show 20 Lines • Show All 163 Lines • Show Last 20 Lines |