Commit 5022b21c authored by eekkelund's avatar eekkelund

[scaling] Better scaling of statusbar

parent 758b0b40
......@@ -38,7 +38,7 @@ import MeeGo.Connman 0.2
Item {
id: root
z: 201
height: root.width/12
height: width/12
width: parent.width
anchors.bottom: parent.bottom
......@@ -132,15 +132,17 @@ Item {
anchors.fill: statusbar
spacing: root.height/4
StatusbarItem {
iconSize: root.height/2
source: (cellularSignalBars.value > 0) ? "image://theme/icon_cell" + cellularSignalBars.value : "image://theme/icon_cell1"
}
StatusbarItem {
iconSize: root.height/2
Label {
id: tech
width: root.height/4
height: root.height/4
font.pointSize: root.height/14
font.pixelSize: root.height/4+root.height/5
font.bold: true
wrapMode: Text.ElideRight
text: (cellularNetworkName.value !== "") ? cellularNetworkName.value.substring(0,3).toUpperCase() : "NA"
......@@ -151,7 +153,7 @@ Item {
anchors.topMargin: root.height/8
width: root.height/4
height: root/height/4
font.pointSize: root.height/14
font.pixelSize: root.height/4+root.height/5
text: {
var techToG = {gprs: "2", egprs: "2.5", umts: "3", hspa: "3.5", lte: "4", unknown: "0"}
return techToG[cellularDataTechnology.value ? cellularDataTechnology.value : "unknown"] + "G"
......@@ -161,6 +163,7 @@ Item {
}
StatusbarItem {
iconSize: root.height/2
source: {
if (wlan.connected) {
if (networkManager.defaultRoute.type !== "wifi")
......@@ -183,23 +186,28 @@ Item {
panel: WifiPanel {}
}
StatusbarItem {
iconSize: root.height/2
source: "image://theme/icon_bt_normal"
}
StatusbarItem {
iconSize: root.height/2
source: "image://theme/icon_nfc_normal"
}
StatusbarItem {
iconSize: root.height/2
source: "image://theme/icon_gps_normal"
}
StatusbarItem {
iconSize: root.height/2
source: "image://theme/icon_play_pause"
}
StatusbarItem {
iconSize: root.height/2
Label {
id: hours
width: root.height/4
height: root.height/4
font.pointSize: root.height/14
font.pixelSize: root.height/4+root.height/5
text: Qt.formatDateTime(wallClock.time, "hh")
}
Label {
......@@ -208,12 +216,13 @@ Item {
anchors.topMargin: root.height/8
width: root.height/4
height: root.height/4
font.pointSize: root.height/14
font.pixelSize: root.height/4+root.height/5
text: Qt.formatDateTime(wallClock.time, "mm")
}
}
StatusbarItem {
iconSize: root.height/2
panel: BatteryPanel {}
source: {
if(batteryChargePercentage.value > 85) {
......
......@@ -5,12 +5,13 @@ Item {
property alias source: icon.source
property string panel_source
property Component panel
property double iconSize
Layout.fillWidth: true
Layout.fillHeight: true
Image {
width: iconSize
height: iconSize
id: icon
width: root.height/2
height: root.height/2
anchors.centerIn: parent
}
MouseArea {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment