aboutsummaryrefslogtreecommitdiff
path: root/src/Barometer.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/Barometer.qml')
-rw-r--r--src/Barometer.qml18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/Barometer.qml b/src/Barometer.qml
index c34f51d..b494fc0 100644
--- a/src/Barometer.qml
+++ b/src/Barometer.qml
@@ -23,6 +23,7 @@ import QtSensors 5.11
import org.asteroid.controls 1.0
import org.asteroid.utils 1.0
import Nemo.Configuration 1.0
+import "graphs"
Item {
id: barometerRoot
@@ -38,14 +39,23 @@ Item {
width: parent.width*0.2
height: width
anchors.horizontalCenter: parent.horizontalCenter
- anchors.bottom: pressureText.top
+ anchors.bottom: baroGraph.top
+ }
+ BarometerGraph {
+ id: baroGraph
+ height: parent.height/3
+ width: parent.width*7/8
+ anchors.centerIn: parent
}
Label {
id: pressureText
- anchors.centerIn: parent
+ anchors.top:baroGraph.bottom
+ anchors.topMargin: parent.height*0.05
+ anchors.horizontalCenter: parent.horizontalCenter
horizontalAlignment: Text.AlignHCenter
text: (pressureSensor.reading.pressure + barometerOffset.value)/100
- font.pixelSize: parent.height / 4
+ font.pixelSize: parent.height / 12
+ font.bold: true
}
ConfigurationValue {
id: barometerOffset
@@ -57,6 +67,6 @@ Item {
anchors.top: pressureText.bottom
horizontalAlignment: Text.AlignHCenter
text: "hPa"
- font.pixelSize: parent.height / 6
+ font.pixelSize: parent.height / 18
}
}