property string currentPriority
+ property bool showHelp: false
+ property string helpMessage: qsTr(
+ "<p>Select font family and edit priorities.</p>" +
+ "<p><img src=\"image://theme/icon-m-toolbar-add\">: Add fonts to the selected <i>Priority</i> in config file.</p>" +
+ "<p><img src=\"image://theme/icon-m-toolbar-delete\">: Remove fonts from the selected <i>Priority</i> in config file. <i>Note: The fonts are NOT uninstalled</i>.</p>" +
+ "<hr/>" +
+ "<p><b>Priorities</b>:<p>" +
+ " <b>Higher</b>: These fonts have a higher priority. ('prepend' fonts in fontconfig)<br/>" +
+ " <b>Normal</b>: These fonts are usally used as default. ('prefer' fonts in fontconfig)<br/>" +
+ " <b>Lowser</b>: These fonts have a lower priority. ('accept' fonts in fontconfig)<br/>" +
+ "<hr/>" +
+ "<p><b>Import System Settings</b>: Import settings from system(/etc/fonts/local.conf).</p>" +
+ "<hr/>" +
+ "<p><b>Remove current font config</b>(Menu): Remove current user's font config file.</p>" +
+ "<p><b>View current font config</b>(Menu): View current user's font config file.</p>" +
+ "<hr/>" +
+ "Please check <a href=\"http://www.freedesktop.org/software/fontconfig/fontconfig-user.html\">fontconfig</a> for more details."
+ )
+
TabGroup {
id: editFontsConfTab
+ opacity: enabled ? 1.0 : 0.5
+
currentTab: sansSerifTab
FontsConfEditor {
ToolBarLayout {
id: editorTabTool
visible: true
+ opacity: enabled ? 1.0 : 0.5
ToolIcon {
platformIconId: "toolbar-back"
onClicked: {
pageStack.push(fontsConfViewPageComponent, { "text": controller.localFontsConf } )
}
}
+ MenuItem {
+ text: qsTr("Help")
+ onClicked: showHelp = true
+ }
}
}
onAccepted: controller.resetLocalFontsConf()
}
+ HelpDialog {
+ id: helpDialog
+ anchors.fill: editFontsConfTab
+ message: helpMessage
+ visible: showHelp
+ onClicked: showHelp = false
+ }
+
+ states: [
+ State {
+ name: "showHelp"
+ when: showHelp
+ PropertyChanges {
+ target: editFontsConfTab
+ enabled: false
+ }
+ PropertyChanges {
+ target: editorTabTool
+ enabled: false
+ }
+ }
+ ]
+
}