Edit Style.qml so barHeight check for vertical bar
SystemMonitor.qml: edit layout a little bit
This commit is contained in:
parent
85cef214c8
commit
8982909fae
2 changed files with 21 additions and 22 deletions
|
|
@ -66,9 +66,9 @@ Singleton {
|
||||||
property int animationSlowest: Math.round(750 / Settings.data.general.animationSpeed)
|
property int animationSlowest: Math.round(750 / Settings.data.general.animationSpeed)
|
||||||
|
|
||||||
// Dimensions
|
// Dimensions
|
||||||
property int barHeight: 36
|
property int barHeight: (Settings.data.bar.position === "left" || Settings.data.bar.position === "right") ? 40 : 36
|
||||||
property int capsuleHeight: (barHeight * 0.73)
|
property int capsuleHeight: (barHeight * 0.73)
|
||||||
property int baseWidgetSize: 32
|
property int baseWidgetSize: (barHeight * 0.9)
|
||||||
property int sliderWidth: 200
|
property int sliderWidth: 200
|
||||||
|
|
||||||
// Delays
|
// Delays
|
||||||
|
|
|
||||||
|
|
@ -128,8 +128,7 @@ Item {
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: backgroundContainer
|
id: backgroundContainer
|
||||||
anchors.left: parent.left
|
anchors.centerIn: parent
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
width: (barPosition === "left" || barPosition === "right") ? Math.round(Style.capsuleHeight * scaling) : (horizontalLayout.implicitWidth + Style.marginL * 2 * scaling)
|
width: (barPosition === "left" || barPosition === "right") ? Math.round(Style.capsuleHeight * scaling) : (horizontalLayout.implicitWidth + Style.marginL * 2 * scaling)
|
||||||
height: (barPosition === "left" || barPosition === "right") ? parent.height : Math.round(Style.capsuleHeight * scaling)
|
height: (barPosition === "left" || barPosition === "right") ? parent.height : Math.round(Style.capsuleHeight * scaling)
|
||||||
radius: Math.round(Style.radiusM * scaling)
|
radius: Math.round(Style.radiusM * scaling)
|
||||||
|
|
@ -328,22 +327,22 @@ Item {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: verticalLayout
|
id: verticalLayout
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
width: Math.round(32 * scaling)
|
width: Math.round(28 * scaling)
|
||||||
height: parent.height - Style.marginXS * scaling * 2
|
height: parent.height
|
||||||
spacing: Style.marginXS * scaling
|
spacing: Style.marginXXS * scaling
|
||||||
visible: barPosition === "left" || barPosition === "right"
|
visible: barPosition === "left" || barPosition === "right"
|
||||||
|
|
||||||
// CPU Usage Component
|
// CPU Usage Component
|
||||||
Item {
|
Item {
|
||||||
Layout.preferredHeight: Math.round(Style.capsuleHeight * scaling)
|
Layout.preferredHeight: Math.round(Style.capsuleHeight * scaling)
|
||||||
Layout.preferredWidth: Math.round(32 * scaling)
|
Layout.preferredWidth: Math.round(28 * scaling)
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
visible: showCpuUsage
|
visible: showCpuUsage
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: cpuUsageRowVertical
|
id: cpuUsageRowVertical
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
spacing: Style.marginXXS * scaling
|
spacing: 1 * scaling
|
||||||
|
|
||||||
NIcon {
|
NIcon {
|
||||||
icon: "cpu-usage"
|
icon: "cpu-usage"
|
||||||
|
|
@ -352,7 +351,7 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
NText {
|
NText {
|
||||||
text: `${SystemStatService.cpuUsage}%`
|
text: `${Math.round(SystemStatService.cpuUsage)}%`
|
||||||
font.family: Settings.data.ui.fontFixed
|
font.family: Settings.data.ui.fontFixed
|
||||||
font.pointSize: Style.fontSizeXXS * scaling * 0.8
|
font.pointSize: Style.fontSizeXXS * scaling * 0.8
|
||||||
font.weight: Style.fontWeightMedium
|
font.weight: Style.fontWeightMedium
|
||||||
|
|
@ -366,14 +365,14 @@ Item {
|
||||||
// CPU Temperature Component
|
// CPU Temperature Component
|
||||||
Item {
|
Item {
|
||||||
Layout.preferredHeight: Math.round(Style.capsuleHeight * scaling)
|
Layout.preferredHeight: Math.round(Style.capsuleHeight * scaling)
|
||||||
Layout.preferredWidth: Math.round(32 * scaling)
|
Layout.preferredWidth: Math.round(28 * scaling)
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
visible: showCpuTemp
|
visible: showCpuTemp
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: cpuTempRowVertical
|
id: cpuTempRowVertical
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
spacing: Style.marginXXS * scaling
|
spacing: 1 * scaling
|
||||||
|
|
||||||
NIcon {
|
NIcon {
|
||||||
icon: "cpu-temperature"
|
icon: "cpu-temperature"
|
||||||
|
|
@ -383,7 +382,7 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
NText {
|
NText {
|
||||||
text: `${SystemStatService.cpuTemp}°C`
|
text: `${SystemStatService.cpuTemp}°`
|
||||||
font.family: Settings.data.ui.fontFixed
|
font.family: Settings.data.ui.fontFixed
|
||||||
font.pointSize: Style.fontSizeXXS * scaling * 0.8
|
font.pointSize: Style.fontSizeXXS * scaling * 0.8
|
||||||
font.weight: Style.fontWeightMedium
|
font.weight: Style.fontWeightMedium
|
||||||
|
|
@ -397,14 +396,14 @@ Item {
|
||||||
// Memory Usage Component
|
// Memory Usage Component
|
||||||
Item {
|
Item {
|
||||||
Layout.preferredHeight: Math.round(Style.capsuleHeight * scaling)
|
Layout.preferredHeight: Math.round(Style.capsuleHeight * scaling)
|
||||||
Layout.preferredWidth: Math.round(32 * scaling)
|
Layout.preferredWidth: Math.round(28 * scaling)
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
visible: showMemoryUsage
|
visible: showMemoryUsage
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: memoryUsageRowVertical
|
id: memoryUsageRowVertical
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
spacing: Style.marginXXS * scaling
|
spacing: 1 * scaling
|
||||||
|
|
||||||
NIcon {
|
NIcon {
|
||||||
icon: "memory"
|
icon: "memory"
|
||||||
|
|
@ -413,7 +412,7 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
NText {
|
NText {
|
||||||
text: showMemoryAsPercent ? `${SystemStatService.memPercent}%` : `${SystemStatService.memGb}G`
|
text: showMemoryAsPercent ? `${SystemStatService.memPercent}%` : `${Math.round(SystemStatService.memGb)}G`
|
||||||
font.family: Settings.data.ui.fontFixed
|
font.family: Settings.data.ui.fontFixed
|
||||||
font.pointSize: Style.fontSizeXXS * scaling * 0.8
|
font.pointSize: Style.fontSizeXXS * scaling * 0.8
|
||||||
font.weight: Style.fontWeightMedium
|
font.weight: Style.fontWeightMedium
|
||||||
|
|
@ -427,14 +426,14 @@ Item {
|
||||||
// Network Download Speed Component
|
// Network Download Speed Component
|
||||||
Item {
|
Item {
|
||||||
Layout.preferredHeight: Math.round(Style.capsuleHeight * scaling)
|
Layout.preferredHeight: Math.round(Style.capsuleHeight * scaling)
|
||||||
Layout.preferredWidth: Math.round(32 * scaling)
|
Layout.preferredWidth: Math.round(28 * scaling)
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
visible: showNetworkStats
|
visible: showNetworkStats
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: networkDownloadRowVertical
|
id: networkDownloadRowVertical
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
spacing: Style.marginXXS * scaling
|
spacing: 1 * scaling
|
||||||
|
|
||||||
NIcon {
|
NIcon {
|
||||||
icon: "download-speed"
|
icon: "download-speed"
|
||||||
|
|
@ -457,14 +456,14 @@ Item {
|
||||||
// Network Upload Speed Component
|
// Network Upload Speed Component
|
||||||
Item {
|
Item {
|
||||||
Layout.preferredHeight: Math.round(Style.capsuleHeight * scaling)
|
Layout.preferredHeight: Math.round(Style.capsuleHeight * scaling)
|
||||||
Layout.preferredWidth: Math.round(32 * scaling)
|
Layout.preferredWidth: Math.round(28 * scaling)
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
visible: showNetworkStats
|
visible: showNetworkStats
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: networkUploadRowVertical
|
id: networkUploadRowVertical
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
spacing: Style.marginXXS * scaling
|
spacing: 1 * scaling
|
||||||
|
|
||||||
NIcon {
|
NIcon {
|
||||||
icon: "upload-speed"
|
icon: "upload-speed"
|
||||||
|
|
@ -487,14 +486,14 @@ Item {
|
||||||
// Disk Usage Component (primary drive)
|
// Disk Usage Component (primary drive)
|
||||||
Item {
|
Item {
|
||||||
Layout.preferredHeight: Math.round(Style.capsuleHeight * scaling)
|
Layout.preferredHeight: Math.round(Style.capsuleHeight * scaling)
|
||||||
Layout.preferredWidth: Math.round(32 * scaling)
|
Layout.preferredWidth: Math.round(28 * scaling)
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
visible: showDiskUsage
|
visible: showDiskUsage
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: diskUsageRowVertical
|
id: diskUsageRowVertical
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
spacing: Style.marginXXS * scaling
|
spacing: 1 * scaling
|
||||||
|
|
||||||
NIcon {
|
NIcon {
|
||||||
icon: "storage"
|
icon: "storage"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue