Alexandra Betouni 4ee21ada05 feat(desktop) Added image function in Style
Introduced Style.svg() Style.png() Style.emoji() and
Style.icon() in Style.qml. Those should be used to
set the source in Images instead of using relative
paths. Usage:
Image {
   source: Style.svg("check)
   ....

Also moved all Singletons inside a new "utils"
folder and made it a QML module, to use
import utils 1.0 instead of relative paths

Closes #3678
2021-09-28 15:28:00 -04:00

79 lines
2.1 KiB
QML

import QtQuick 2.13
import QtQuick.Controls 2.13
import QtQuick.Layouts 1.13
import utils 1.0
import "../../../shared"
import "../../../shared/status"
Column {
spacing: 0
StatusSectionHeadline {
text: qsTr("Bandwidth")
topPadding: Style.current.bigPadding
bottomPadding: Style.current.padding
}
Row {
width: parent.width
spacing: 10
StyledText {
text: qsTr("Upload")
width: 250
anchors.verticalCenter: parent.verticalCenter
}
Item {
width: 140
height: 44
Input {
id: uploadRate
text: Math.round(parseInt(nodeModel.uploadRate, 10) / 1024 * 100) / 100
width: parent.width
readOnly: true
customHeight: 44
placeholderText: "0"
anchors.top: parent.top
}
StyledText {
color: Style.current.secondaryText
text: qsTr("Kb/s")
anchors.verticalCenter: parent.verticalCenter
anchors.right: uploadRate.right
anchors.rightMargin: Style.current.padding
font.pixelSize: 15
}
}
StyledText {
text: qsTr("Download")
width: 273
anchors.verticalCenter: parent.verticalCenter
}
Item {
width: 140
height: 44
Input {
id: downloadRate
text: Math.round(parseInt(nodeModel.downloadRate, 10) / 1024 * 100) / 100
width: parent.width
readOnly: true
customHeight: 44
placeholderText: "0"
anchors.top: parent.top
}
StyledText {
color: Style.current.secondaryText
text: qsTr("Kb/s")
anchors.verticalCenter: parent.verticalCenter
anchors.right: downloadRate.right
anchors.rightMargin: Style.current.padding
font.pixelSize: 15
}
}
}
}