psa: added article list and display font settings
authorYves Marcoz <yves@marcoz.org>
Fri, 6 Jan 2012 06:06:38 +0000 (22:06 -0800)
committerYves Marcoz <yves@marcoz.org>
Fri, 6 Jan 2012 06:06:38 +0000 (22:06 -0800)
psa_harmattan/feedingit/qml/ArticleDisplay.qml
psa_harmattan/feedingit/qml/ArticleViewer.qml
psa_harmattan/feedingit/qml/Settings.qml
psa_harmattan/feedingit/qml/SettingsPage.qml
psa_harmattan/feedingit/qml/SliderSetting.qml [new file with mode: 0644]

index e014865..9bbc659 100644 (file)
@@ -32,7 +32,7 @@ Rectangle {
             //scale: 1.25;
             transformOrigin: Item.TopLeft
             scale: slider.value;
-            //settings.defaultFontSize: 24
+            settings.defaultFontSize: articleView.webviewFontSize
         }
 
 //        onFlickStarted: {
index 7c18550..7cf092f 100644 (file)
@@ -63,6 +63,7 @@ Item {
 
     ListView {
         id: articleView;
+        property int webviewFontSize: settings.webviewFontSize
         model: articles;
         delegate: viewer
         orientation: ListView.Horizontal
index a19515b..e7e87f2 100644 (file)
@@ -13,7 +13,8 @@ Item {
 
     property bool autoUpdateEnabled: controller.getBooleanSetting("autoupdate")
 
-    property int articleListingTextSize: 16
+    property int articleListingTextSize: controller.getIntSetting("fontSize")
+    property int webviewFontSize: controller.getIntSetting("artFontSize")
 
     Component.onCompleted: {
         theme.inverted = controller.getBooleanSetting("theme")
index 4a85b72..b97ae41 100644 (file)
@@ -8,6 +8,7 @@ Page {
 
     Column {
         width: parent.width
+        spacing: 5
 
         SwitchSetting {
             text: qsTr("Use Dark Theme")
@@ -57,6 +58,25 @@ Page {
                 settings.autoUpdateEnabled = checked
             }
         }
+
+        SliderSetting {
+            text: qsTr("Article Listing Font Size")
+            value: settings.articleListingTextSize
+            onValueChanged: {
+                controller.setIntSetting("fontSize", value)
+                settings.articleListingTextSize = value
+
+            }
+        }
+
+        SliderSetting {
+            text: qsTr("Article Font Size")
+            value: settings.webviewFontSize
+            onValueChanged: {
+                controller.setIntSetting("artFontSize", value)
+                settings.webviewFontSize = value
+            }
+         }
     }
 
 }
diff --git a/psa_harmattan/feedingit/qml/SliderSetting.qml b/psa_harmattan/feedingit/qml/SliderSetting.qml
new file mode 100644 (file)
index 0000000..1ebc7db
--- /dev/null
@@ -0,0 +1,28 @@
+import QtQuick 1.0
+import com.nokia.meego 1.0
+
+Row {
+    width: parent.width
+    property alias text: themeText.text
+    property alias value: mySlider.value
+    signal valueChanged()
+
+    Text {
+        id: themeText
+        color: settings.mainTextColour;
+        font.pointSize: settings.mainTextSize
+        width: parent.width - mySlider.width
+        wrapMode: Text.WordWrap;
+    }
+
+    Slider {
+         id:mySlider
+         stepSize:1
+         valueIndicatorVisible: true
+         minimumValue:12
+         maximumValue:30
+         width:300
+         onPressedChanged: if (!pressed) { parent.valueChanged() }
+         orientation: Qt.Horizontal
+     }
+}