X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=qml%2Ffontmanager%2FEditFontsConfPage.qml;fp=qml%2Ffontmanager%2FEditFontsConfPage.qml;h=e3c43ef9e80019024e344e5ac30a870e83d2e3b6;hb=7b0cd0d7ab05e0c75b231eec8b7de0ee2c93e244;hp=a71e4cbf587f6722b9468fb7bc8a5b830fe7c626;hpb=448cdcf0643ab7848e11d8a928b2d8844196edc8;p=fontmanager%2Ffontmanager.git diff --git a/qml/fontmanager/EditFontsConfPage.qml b/qml/fontmanager/EditFontsConfPage.qml index a71e4cb..e3c43ef 100644 --- a/qml/fontmanager/EditFontsConfPage.qml +++ b/qml/fontmanager/EditFontsConfPage.qml @@ -39,6 +39,7 @@ // 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 { @@ -66,8 +67,20 @@ Page { "Please check fontconfig 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 @@ -94,13 +107,86 @@ Page { 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] @@ -138,6 +224,10 @@ Page { text: monospaceTab.familyName tab: monospaceTab } + TabButton { + text: systemTab.familyName + tab: systemTab + } } ToolIcon { platformIconId: "toolbar-view-menu" @@ -167,7 +257,7 @@ Page { } MenuItem { text: qsTr("View current fonts config"); -// enabled: controller.localFontsConfExists + // enabled: controller.localFontsConfExists onClicked: { editMenu.close() pageStack.push(fontsConfViewPageComponent, { "text": controller.localFontsConf } )