bar: uniformising left section look (border, radius, colors) with workspace
This commit is contained in:
parent
549a7ec6f3
commit
ea72d7675e
5 changed files with 27 additions and 84 deletions
|
|
@ -54,9 +54,12 @@ Row {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
// Let the Rectangle size itself based on its content (the Row)
|
// Let the Rectangle size itself based on its content (the Row)
|
||||||
width: row.width + Style.marginMedium * scaling * 2
|
width: row.width + Style.marginMedium * scaling * 2
|
||||||
height: row.height
|
height: Math.round(Style.barHeight * 0.75 * scaling)
|
||||||
|
radius: Math.round(Style.radiusMedium * scaling)
|
||||||
color: Color.mSurfaceVariant
|
color: Color.mSurfaceVariant
|
||||||
radius: Style.radiusSmall * scaling
|
border.color: Color.mOutline
|
||||||
|
border.width: Math.max(1, Math.round(Style.borderThin * scaling))
|
||||||
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ Variants {
|
||||||
id: bar
|
id: bar
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: Qt.rgba(Color.mSurface,Color.mSurface.g,Color.mSurface.b,Settings.data.bar.backgroundOpacity)
|
color: Qt.rgba(Color.mSurface, Color.mSurface.g, Color.mSurface.b, Settings.data.bar.backgroundOpacity)
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,13 @@ Row {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
// Let the Rectangle size itself based on its content (the Row)
|
// Let the Rectangle size itself based on its content (the Row)
|
||||||
width: row.width + Style.marginMedium * scaling * 2
|
width: row.width + Style.marginMedium * scaling * 2
|
||||||
height: row.height
|
|
||||||
|
height: Math.round(Style.barHeight * 0.75 * scaling)
|
||||||
|
radius: Math.round(Style.radiusMedium * scaling)
|
||||||
color: Color.mSurfaceVariant
|
color: Color.mSurfaceVariant
|
||||||
radius: Style.radiusSmall * scaling
|
border.color: Color.mOutline
|
||||||
|
border.width: Math.max(1, Math.round(Style.borderThin * scaling))
|
||||||
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
|
|
||||||
|
|
@ -13,10 +13,13 @@ Row {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
// Let the Rectangle size itself based on its content (the Row)
|
// Let the Rectangle size itself based on its content (the Row)
|
||||||
width: row.width + Style.marginMedium * scaling * 2
|
width: row.width + Style.marginMedium * scaling * 2
|
||||||
height: row.height
|
|
||||||
color: Color.mSurfaceVariant
|
|
||||||
|
|
||||||
radius: Style.radiusSmall * scaling
|
height: Math.round(Style.barHeight * 0.75 * scaling)
|
||||||
|
radius: Math.round(Style.radiusMedium * scaling)
|
||||||
|
color: Color.mSurfaceVariant
|
||||||
|
border.color: Color.mOutline
|
||||||
|
border.width: Math.max(1, Math.round(Style.borderThin * scaling))
|
||||||
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
|
@ -93,73 +96,4 @@ Row {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // Row {// id: layout
|
}
|
||||||
// anchors.verticalCenter: parent.verticalCenter
|
|
||||||
// spacing: Style.marginSmall * scaling
|
|
||||||
// visible: Settings.data.bar.showSystemInfo
|
|
||||||
|
|
||||||
// // Ensure our width is an integer
|
|
||||||
// width: Math.floor(cpuUsageLayout.width + cpuTempLayout.width + memoryUsageLayout.width + (2 * 10))
|
|
||||||
|
|
||||||
// Row {
|
|
||||||
// id: cpuUsageLayout
|
|
||||||
// spacing: Style.marginTiny * scaling
|
|
||||||
|
|
||||||
// NIcon {
|
|
||||||
// id: cpuUsageIcon
|
|
||||||
// text: "speed"
|
|
||||||
// anchors.verticalCenter: parent.verticalCenter
|
|
||||||
// }
|
|
||||||
|
|
||||||
// NText {
|
|
||||||
// id: cpuUsageText
|
|
||||||
// text: `${SystemStatService.cpuUsage}%`
|
|
||||||
// font.pointSize: Style.fontSizeReduced * scaling
|
|
||||||
// font.weight: Style.fontWeightBold
|
|
||||||
// anchors.verticalCenter: parent.verticalCenter
|
|
||||||
// verticalAlignment: Text.AlignVCenter
|
|
||||||
// color: Color.mPrimary
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // CPU Temperature Component
|
|
||||||
// Row {
|
|
||||||
// id: cpuTempLayout
|
|
||||||
// spacing: Style.marginTiny * scaling
|
|
||||||
|
|
||||||
// NIcon {
|
|
||||||
// text: "thermometer"
|
|
||||||
// anchors.verticalCenter: parent.verticalCenter
|
|
||||||
// }
|
|
||||||
|
|
||||||
// NText {
|
|
||||||
// text: `${SystemStatService.cpuTemp}°C`
|
|
||||||
// font.pointSize: Style.fontSizeReduced * scaling
|
|
||||||
// font.weight: Style.fontWeightBold
|
|
||||||
// anchors.verticalCenter: parent.verticalCenter
|
|
||||||
// verticalAlignment: Text.AlignVCenter
|
|
||||||
// color: Color.mPrimary
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // Memory Usage Component
|
|
||||||
// Row {
|
|
||||||
// id: memoryUsageLayout
|
|
||||||
// spacing: Style.marginTiny * scaling
|
|
||||||
|
|
||||||
// NIcon {
|
|
||||||
// text: "memory"
|
|
||||||
// anchors.verticalCenter: parent.verticalCenter
|
|
||||||
// }
|
|
||||||
|
|
||||||
// NText {
|
|
||||||
// text: `${SystemStatService.memoryUsageGb}G`
|
|
||||||
// font.pointSize: Style.fontSizeReduced * scaling
|
|
||||||
// font.weight: Style.fontWeightBold
|
|
||||||
// anchors.verticalCenter: parent.verticalCenter
|
|
||||||
// verticalAlignment: Text.AlignVCenter
|
|
||||||
// color: Color.mPrimary
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -114,14 +114,16 @@ Item {
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: workspaceBackground
|
id: workspaceBackground
|
||||||
width: parent.width - Math.round(15 * scaling)
|
width: parent.width - Style.marginSmall * scaling * 2
|
||||||
height: Math.round(26 * scaling)
|
|
||||||
|
height: Math.round(Style.barHeight * 0.75 * scaling)
|
||||||
|
radius: Math.round(Style.radiusMedium * scaling)
|
||||||
|
color: Color.mSurfaceVariant
|
||||||
|
border.color: Color.mOutline
|
||||||
|
border.width: Math.max(1, Math.round(Style.borderThin * scaling))
|
||||||
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
radius: Math.round(12 * scaling)
|
|
||||||
color: Color.mSurfaceVariant
|
|
||||||
border.color: Color.mOutlineVariant
|
|
||||||
border.width: Math.max(1, Math.round(1 * scaling))
|
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
layer.effect: MultiEffect {
|
layer.effect: MultiEffect {
|
||||||
shadowColor: Color.mShadow
|
shadowColor: Color.mShadow
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue