bar: uniformising left section look (border, radius, colors) with workspace

This commit is contained in:
quadbyte 2025-08-18 09:44:11 -04:00
parent 549a7ec6f3
commit ea72d7675e
5 changed files with 27 additions and 84 deletions

View file

@ -54,9 +54,12 @@ Row {
Rectangle {
// Let the Rectangle size itself based on its content (the Row)
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
radius: Style.radiusSmall * scaling
border.color: Color.mOutline
border.width: Math.max(1, Math.round(Style.borderThin * scaling))
anchors.verticalCenter: parent.verticalCenter
Item {

View file

@ -39,7 +39,7 @@ Variants {
id: bar
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
}

View file

@ -27,9 +27,13 @@ Row {
Rectangle {
// Let the Rectangle size itself based on its content (the Row)
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
radius: Style.radiusSmall * scaling
border.color: Color.mOutline
border.width: Math.max(1, Math.round(Style.borderThin * scaling))
anchors.verticalCenter: parent.verticalCenter
Item {

View file

@ -13,10 +13,13 @@ Row {
Rectangle {
// Let the Rectangle size itself based on its content (the Row)
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
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
// }
// }
// }
}

View file

@ -114,14 +114,16 @@ Item {
Rectangle {
id: workspaceBackground
width: parent.width - Math.round(15 * scaling)
height: Math.round(26 * scaling)
width: parent.width - Style.marginSmall * scaling * 2
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.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.effect: MultiEffect {
shadowColor: Color.mShadow