Changeset View
Changeset View
Standalone View
Standalone View
kcms/fonts/package/contents/ui/main.qml
Show All 15 Lines | 1 | /* | |||
---|---|---|---|---|---|
16 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 16 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
17 | Boston, MA 02110-1301, USA. | 17 | Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | import QtQuick 2.1 | 20 | import QtQuick 2.1 | ||
21 | import QtQuick.Layouts 1.1 | 21 | import QtQuick.Layouts 1.1 | ||
22 | import QtQuick.Controls 2.0 as QtControls | 22 | import QtQuick.Controls 2.0 as QtControls | ||
23 | import QtQuick.Dialogs 1.2 as QtDialogs | 23 | import QtQuick.Dialogs 1.2 as QtDialogs | ||
24 | import org.kde.kirigami 2.3 as Kirigami | 24 | import org.kde.kirigami 2.4 as Kirigami | ||
25 | import org.kde.kcm 1.1 as KCM | 25 | import org.kde.kcm 1.1 as KCM | ||
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 | ColumnLayout { | ||||
33 | | ||||
34 | Kirigami.InlineMessage { | ||||
35 | id: antiAliasingMessage | ||||
36 | Layout.fillWidth: true | ||||
37 | showCloseButton: true | ||||
38 | text: i18n("Some changes such as anti-aliasing or DPI will only affect newly started applications.") | ||||
39 | | ||||
40 | Connections { | ||||
41 | target: kcm.fontAASettings | ||||
42 | onAliasingChangeApplied: antiAliasingMessage.visible = true | ||||
43 | } | ||||
44 | } | ||||
45 | | ||||
32 | Kirigami.FormLayout { | 46 | Kirigami.FormLayout { | ||
33 | id: formLayout | 47 | id: formLayout | ||
34 | readonly property int maxImplicitWidth: Math.max(adjustAllFontsButton.implicitWidth, excludeField.implicitWidth, subPixelCombo.implicitWidth, hintingCombo.implicitWidth) | 48 | readonly property int maxImplicitWidth: Math.max(adjustAllFontsButton.implicitWidth, excludeField.implicitWidth, subPixelCombo.implicitWidth, hintingCombo.implicitWidth) | ||
davidedmundson: Do we need a Layout.fillWidth here? | |||||
filipf: This happens without` Layout.fillWidth`
{F7097863} | |||||
35 | 49 | | |||
36 | QtControls.Button { | 50 | QtControls.Button { | ||
37 | id: adjustAllFontsButton | 51 | id: adjustAllFontsButton | ||
38 | Layout.preferredWidth: formLayout.maxImplicitWidth | 52 | Layout.preferredWidth: formLayout.maxImplicitWidth | ||
39 | icon.name: "font-select-symbolic" | 53 | icon.name: "font-select-symbolic" | ||
40 | text: i18n("&Adjust All Fonts...") | 54 | text: i18n("&Adjust All Fonts...") | ||
41 | 55 | | |||
42 | onClicked: kcm.adjustAllFonts(); | 56 | onClicked: kcm.adjustAllFonts(); | ||
▲ Show 20 Lines • Show All 191 Lines • ▼ Show 20 Line(s) | 247 | if (adjustAllFonts) { | |||
234 | kcm.adjustAllFonts(font); | 248 | kcm.adjustAllFonts(font); | ||
235 | } else { | 249 | } else { | ||
236 | kcm[currentCategory] = font; | 250 | kcm[currentCategory] = font; | ||
237 | } | 251 | } | ||
238 | } | 252 | } | ||
239 | } | 253 | } | ||
240 | } | 254 | } | ||
241 | } | 255 | } | ||
242 | 256 | } |
Do we need a Layout.fillWidth here?