Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[scaling] Scaling of statusbar
  • Loading branch information
eekkelund committed Feb 25, 2016
1 parent 1f90803 commit 758b0b4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
34 changes: 17 additions & 17 deletions src/qml/Statusbar.qml
Expand Up @@ -38,7 +38,7 @@ import MeeGo.Connman 0.2
Item {
id: root
z: 201
height: 48
height: root.width/12
width: parent.width
anchors.bottom: parent.bottom

Expand Down Expand Up @@ -130,28 +130,28 @@ Item {

RowLayout {
anchors.fill: statusbar
spacing: 16
spacing: root.height/4
StatusbarItem {
source: (cellularSignalBars.value > 0) ? "image://theme/icon_cell" + cellularSignalBars.value : "image://theme/icon_cell1"
}

StatusbarItem {
Label {
id: tech
width: 16
height: 16
font.pointSize: 6
width: root.height/4
height: root.height/4
font.pointSize: root.height/14
font.bold: true
wrapMode: Text.ElideRight
text: (cellularNetworkName.value !== "") ? cellularNetworkName.value.substring(0,3).toUpperCase() : "NA"
}

Label {
anchors.top: tech.bottom
anchors.topMargin: 4
width: 16
height: 16
font.pointSize: 6
anchors.topMargin: root.height/8
width: root.height/4
height: root/height/4
font.pointSize: root.height/14
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"
Expand Down Expand Up @@ -192,23 +192,23 @@ Item {
source: "image://theme/icon_gps_normal"
}
StatusbarItem {
source: "image://theme/icon_play_pause"
source: "image://theme/icon_play_pause"
}
StatusbarItem {
Label {
id: hours
width: 16
height: 16
font.pointSize: 6
width: root.height/4
height: root.height/4
font.pointSize: root.height/14
text: Qt.formatDateTime(wallClock.time, "hh")
}
Label {
id: minutes
anchors.top: hours.bottom
anchors.topMargin: 4
width: 16
height: 16
font.pointSize: 6
anchors.topMargin: root.height/8
width: root.height/4
height: root.height/4
font.pointSize: root.height/14
text: Qt.formatDateTime(wallClock.time, "mm")
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/qml/StatusbarItem.qml
Expand Up @@ -9,6 +9,8 @@ Item {
Layout.fillHeight: true
Image {
id: icon
width: root.height/2
height: root.height/2
anchors.centerIn: parent
}
MouseArea {
Expand Down

0 comments on commit 758b0b4

Please sign in to comment.