// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
import QtQuick 1.1
import com.nokia.meego 1.0
+import com.nokia.extras 1.0
import 'UIConstants.js' as UI
Page {
"Please check <a href=\"http://www.freedesktop.org/software/fontconfig/fontconfig-user.html\">fontconfig</a> for more details."
)
+ property alias curTab: editFontsConfTab.currentTab
+
+ PageHeader {
+ id: pageHeader
+ anchors.top: parent.top
+ anchors.left: parent.left
+ anchors.right: parent.right
+ text: qsTr("Edit Fonts Config: %1").arg(curTab.familyName)
+ }
+
TabGroup {
id: editFontsConfTab
+ anchors.top: pageHeader.bottom
+ anchors.bottom: bottomButtons.top
opacity: enabled ? 1.0 : 0.5
editorController: controller.editorController(family)
}
+ FontsConfEditor {
+ id: systemTab
+ family: "Nokia Pure Text"
+ familyName: qsTr("System")
+ editorController: controller.editorController(family)
+ }
+
+ }
+
+ Item {
+ id: bottomButtons
+
+ height: bottomItem.height + importButton.height + UI.DEFAULT_MARGIN * 2
+ anchors.bottom: parent.bottom
+ anchors.left: parent.left
+ anchors.right: parent.right
+
+ Rectangle {
+ anchors.fill: parent
+ anchors.topMargin: UI.DEFAULT_MARGIN / 2
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: Qt.lighter("#76221d") }
+ GradientStop { position: 1.0; color: Qt.lighter("#bd543d") }
+ }
+
+ Component.onCompleted: {
+ console.log("bottomButtons: " + width + " x " + height)
+ }
+ }
+
+ Item {
+ id: bottomItem
+ anchors.bottom: importButton.top
+ anchors.left: parent.left
+ anchors.right: parent.right
+ height: UI.LIST_ITEM_HEIGHT_SMALL
+
+ ListButton {
+ anchors.left: parent.left
+ anchors.leftMargin: UI.DEFAULT_MARGIN
+ iconSource: "image://theme/icon-m-toolbar-down"
+ onClicked: curTab.moveDownFamily()
+ enabled: (curTab.listView.currentIndex >= 0 &&
+ curTab.listView.currentIndex < curTab.listView.count - 1) &&
+ (!curTab.listView.model.get(curTab.listView.currentIndex+1).header)
+ }
+
+ ListButton {
+ anchors.horizontalCenter: parent.horizontalCenter
+ iconSource: "image://theme/icon-m-toolbar-delete"
+ onClicked: curTab.removeFamily()
+ enabled: curTab.listView.currentIndex >= 0
+ }
+
+ ListButton {
+ anchors.right: parent.right
+ anchors.rightMargin: UI.DEFAULT_MARGIN
+ iconSource: "image://theme/icon-m-toolbar-up"
+ onClicked: curTab.moveUpFamily()
+ enabled: (curTab.listView.currentIndex > 0) && (!curTab.listView.model.get(curTab.listView.currentIndex-1).header)
+ }
+ }
+
+ Button {
+ id: importButton
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: UI.DEFAULT_MARGIN
+ text: qsTr("Import System Settings")
+ onClicked: {
+ controller.importSystemSettings(editFontsConfTab.currentTab.family)
+ }
+ }
}
MultiSelectionDialog {
id: selectInstallFamily
model: installableFamilyListModel
acceptButtonText: qsTr("Add")
- titleText: qsTr("Add Family for %1").arg(editFontsConfTab.currentTab.familyName)
+ titleText: qsTr("Add Family for %1").arg(curTab.familyName)
onAccepted: {
for (var i = 0; i < selectedIndexes.length; i++) {
var idx = selectedIndexes[i]
text: monospaceTab.familyName
tab: monospaceTab
}
+ TabButton {
+ text: systemTab.familyName
+ tab: systemTab
+ }
}
ToolIcon {
platformIconId: "toolbar-view-menu"
}
MenuItem {
text: qsTr("View current fonts config");
-// enabled: controller.localFontsConfExists
+ // enabled: controller.localFontsConfExists
onClicked: {
editMenu.close()
pageStack.push(fontsConfViewPageComponent, { "text": controller.localFontsConf } )