Changeset View
Changeset View
Standalone View
Standalone View
kcms/fonts/package/contents/ui/main.qml
Context not available. | |||||
29 | 29 | | |||
---|---|---|---|---|---|
30 | KCM.ConfigModule.quickHelp: i18n("Fonts") | 30 | KCM.ConfigModule.quickHelp: i18n("Fonts") | ||
31 | 31 | | |||
32 | Column { | ||||
33 | id: easySettings | ||||
34 | Layout.alignment: Qt.AlignHCenter | ||||
35 | spacing: 8 | ||||
36 | FontWidget { | ||||
37 | id: generalFontWidget | ||||
38 | label: i18n("General:") | ||||
39 | category: "generalFont" | ||||
40 | font: kcm.generalFont | ||||
41 | } | ||||
42 | QtControls.Label { | ||||
43 | text: "Select suiting font rendering" | ||||
44 | padding: 2 | ||||
45 | } | ||||
46 | QtControls.Frame { | ||||
47 | id: previewFrame | ||||
48 | Grid { | ||||
49 | id: previewArea | ||||
50 | rows: 2 | ||||
51 | spacing: 4 | ||||
52 | | ||||
53 | Repeater { | ||||
54 | model: 10 | ||||
55 | SelectablePreview { | ||||
56 | fontFamily: generalFontWidget.font.family | ||||
57 | fontSize: generalFontWidget.font.pointSize | ||||
58 | antialiasing: index % 5 == 0 ? 1 : 2 | ||||
59 | hintstyle: index == 0 ? 0 : ((index + 2) % 4)+1 | ||||
60 | subpixel: index % 5 <= 2 ? 1 : 2 | ||||
61 | } | ||||
62 | } | ||||
63 | QtControls.ButtonGroup { | ||||
64 | id: previewButtons | ||||
65 | } | ||||
66 | } | ||||
67 | } | ||||
68 | Row { | ||||
69 | QtControls.Label { | ||||
70 | text: "Expert Settings" | ||||
71 | anchors.verticalCenter: parent.verticalCenter | ||||
72 | } | ||||
73 | QtControls.Button { | ||||
74 | text: " + " | ||||
75 | focusPolicy: Qt.TabFocus | ||||
76 | display: QtControls.AbstractButton.TextOnly | ||||
77 | Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter | ||||
78 | onClicked: { | ||||
79 | if (expertSettings.visible) { | ||||
80 | //previewFrame.visible = 1 | ||||
81 | formLayout.visible = 0 | ||||
82 | roundButton.text = " + " | ||||
83 | } else { | ||||
84 | //previewFrame.visible = 0 | ||||
85 | formLayout.visible = 1 | ||||
86 | roundButton.text = " - " | ||||
87 | } | ||||
88 | } | ||||
89 | } | ||||
90 | } | ||||
91 | } // Column | ||||
92 | | ||||
32 | Kirigami.FormLayout { | 93 | Kirigami.FormLayout { | ||
33 | id: formLayout | 94 | id: formLayout | ||
95 | visible: false | ||||
34 | readonly property int maxImplicitWidth: Math.max(adjustAllFontsButton.implicitWidth, Math.max(antiAliasingComboBox.implicitWidth, Math.max(excludeField.implicitWidth, Math.max(subPixelCombo.implicitWidth, hintingCombo.implicitWidth)))) | 96 | readonly property int maxImplicitWidth: Math.max(adjustAllFontsButton.implicitWidth, Math.max(antiAliasingComboBox.implicitWidth, Math.max(excludeField.implicitWidth, Math.max(subPixelCombo.implicitWidth, hintingCombo.implicitWidth)))) | ||
35 | 97 | | |||
36 | QtControls.Button { | 98 | QtControls.Button { | ||
Context not available. | |||||
41 | onClicked: kcm.adjustAllFonts(); | 103 | onClicked: kcm.adjustAllFonts(); | ||
42 | } | 104 | } | ||
43 | 105 | | |||
44 | FontWidget { | 106 | | ||
45 | id: generalFontWidget | | |||
46 | label: i18n("General:") | | |||
47 | category: "generalFont" | | |||
48 | font: kcm.generalFont | | |||
49 | } | | |||
50 | FontWidget { | 107 | FontWidget { | ||
51 | label: i18n("Fixed width:") | 108 | label: i18n("Fixed width:") | ||
52 | category: "fixedWidthFont" | 109 | category: "fixedWidthFont" | ||
Context not available. |