This commit is contained in:
parent
0c463f24bf
commit
3f125400e2
2 changed files with 125 additions and 54 deletions
|
@ -16,43 +16,29 @@ CoverBackground {
|
|||
days.text = uptime.days + " days"
|
||||
time.text = uptime.hours + " h " + uptime.minutes + " min"
|
||||
load1.text = uptime.load1.toFixed(2)
|
||||
load5_15.text = uptime.load5.toFixed(2) + " " + uptime.load15
|
||||
.toFixed(2)
|
||||
load5.text = uptime.load5.toFixed(2)
|
||||
load15.text = uptime.load15.toFixed(2)
|
||||
}
|
||||
|
||||
Column {
|
||||
width: cover.width
|
||||
spacing: Theme.paddingSmall
|
||||
|
||||
Label {
|
||||
id: heading
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: "Uptime"
|
||||
color: "white"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
}
|
||||
|
||||
Separator {
|
||||
x: Theme.paddingLarge
|
||||
width: parent.width - Theme.paddingLarge * 2
|
||||
horizontalAlignment: Qt.AlignCenter
|
||||
color: Theme.highlightColor
|
||||
}
|
||||
y: Theme.paddingLarge
|
||||
|
||||
Label {
|
||||
id: days
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: "Refreshing..."
|
||||
color: Theme.highlightColor
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.primaryColor
|
||||
font.family: Theme.fontFamilyHeading
|
||||
}
|
||||
|
||||
Label {
|
||||
id: time
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: ""
|
||||
color: Theme.highlightColor
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.primaryColor
|
||||
font.family: Theme.fontFamilyHeading
|
||||
}
|
||||
|
||||
Separator {
|
||||
|
@ -62,20 +48,73 @@ CoverBackground {
|
|||
color: Theme.highlightColor
|
||||
}
|
||||
|
||||
Label {
|
||||
id: load1
|
||||
Row {
|
||||
width: parent.width - Theme.paddingLarge * 2
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: ""
|
||||
color: Theme.highlightColor
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
spacing: 15
|
||||
|
||||
Label {
|
||||
text: "1"
|
||||
color: Theme.secondaryColor
|
||||
horizontalAlignment: Qt.AlignRight
|
||||
width: parent.width / 4
|
||||
font.family: Theme.fontFamilyHeading
|
||||
}
|
||||
|
||||
Label {
|
||||
id: load5_15
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
id: load1
|
||||
text: ""
|
||||
color: Theme.highlightColor
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.primaryColor
|
||||
horizontalAlignment: Qt.AlignLeft
|
||||
width: 3 * parent.width / 4
|
||||
font.family: Theme.fontFamilyHeading
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
width: parent.width - Theme.paddingLarge * 2
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
spacing: 15
|
||||
|
||||
Label {
|
||||
text: "5"
|
||||
color: Theme.secondaryColor
|
||||
horizontalAlignment: Qt.AlignRight
|
||||
width: parent.width / 4
|
||||
font.family: Theme.fontFamilyHeading
|
||||
}
|
||||
|
||||
Label {
|
||||
id: load5
|
||||
text: ""
|
||||
color: Theme.primaryColor
|
||||
horizontalAlignment: Qt.AlignLeft
|
||||
width: 3 * parent.width / 4
|
||||
font.family: Theme.fontFamilyHeading
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
width: parent.width - Theme.paddingLarge * 2
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
spacing: 15
|
||||
|
||||
Label {
|
||||
text: "15"
|
||||
color: Theme.secondaryColor
|
||||
horizontalAlignment: Qt.AlignRight
|
||||
width: parent.width / 4
|
||||
font.family: Theme.fontFamilyHeading
|
||||
}
|
||||
|
||||
Label {
|
||||
id: load15
|
||||
text: ""
|
||||
color: Theme.primaryColor
|
||||
horizontalAlignment: Qt.AlignLeft
|
||||
width: 3 * parent.width / 4
|
||||
font.family: Theme.fontFamilyHeading
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,8 +24,8 @@ Page {
|
|||
days.text = uptime.days + " days"
|
||||
time.text = uptime.hours + " h " + uptime.minutes + " min"
|
||||
load1.text = uptime.load1.toFixed(2)
|
||||
load5_15.text = uptime.load5.toFixed(2) + " " + uptime.load15
|
||||
.toFixed(2)
|
||||
load5.text = uptime.load5.toFixed(2)
|
||||
load15.text = uptime.load15.toFixed(2)
|
||||
}
|
||||
|
||||
// To enable PullDownMenu, place our content in a SilicaFlickable
|
||||
|
@ -61,14 +61,14 @@ Page {
|
|||
width: page.width
|
||||
spacing: Theme.paddingLarge
|
||||
PageHeader {
|
||||
title: "SailTime"
|
||||
title: "Uptime"
|
||||
}
|
||||
|
||||
Label {
|
||||
id: days
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: "Refreshing..."
|
||||
color: Theme.highlightColor
|
||||
color: Theme.primaryColor
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
}
|
||||
|
||||
|
@ -76,31 +76,63 @@ Page {
|
|||
id: time
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: ""
|
||||
color: Theme.highlightColor
|
||||
color: Theme.primaryColor
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
}
|
||||
|
||||
Separator {
|
||||
x: Theme.paddingLarge
|
||||
PageHeader {
|
||||
title: "Load averages"
|
||||
}
|
||||
|
||||
Row
|
||||
{
|
||||
width: parent.width - Theme.paddingLarge * 2
|
||||
horizontalAlignment: Qt.AlignCenter
|
||||
color: Theme.highlightColor
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
spacing: 18
|
||||
|
||||
Label {
|
||||
text: "1"
|
||||
color: Theme.secondaryColor
|
||||
horizontalAlignment: Qt.AlignRight
|
||||
width: parent.width / 24
|
||||
}
|
||||
|
||||
Label {
|
||||
id: load1
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: ""
|
||||
color: Theme.highlightColor
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
color: Theme.primaryColor
|
||||
width: 3 * parent.width / 12
|
||||
horizontalAlignment: Qt.AlignLeft
|
||||
}
|
||||
|
||||
Label {
|
||||
id: load5_15
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: "5"
|
||||
color: Theme.secondaryColor
|
||||
horizontalAlignment: Qt.AlignRight
|
||||
width: parent.width / 24
|
||||
}
|
||||
|
||||
Label {
|
||||
id: load5
|
||||
text: ""
|
||||
color: Theme.highlightColor
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
color: Theme.primaryColor
|
||||
width: 3 * parent.width / 12
|
||||
horizontalAlignment: Qt.AlignLeft
|
||||
}
|
||||
Label {
|
||||
text: "15"
|
||||
color: Theme.secondaryColor
|
||||
horizontalAlignment: Qt.AlignRight
|
||||
width: parent.width / 24
|
||||
}
|
||||
|
||||
Label {
|
||||
id: load15
|
||||
text: ""
|
||||
color: Theme.primaryColor
|
||||
width: 3 * parent.width / 12
|
||||
horizontalAlignment: Qt.AlignLeft
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue