fix: font assignment in multiple components
This commit is contained in:
@@ -14,7 +14,7 @@ import qs.Services
|
||||
WidgetBase {
|
||||
id: root
|
||||
|
||||
readonly property font font: Tokens.font.clock.family(Config.appearance.font.family.clock).build()
|
||||
readonly property font font: Tokens.font.clock.family(Config.appearance.font.family.clock).size(Tokens.font.body.small.pointSize).build()
|
||||
readonly property color contentColor: Colors.palette.m3onSurface
|
||||
readonly property string effectiveFormat: {
|
||||
let fmt = Config.general.dateFormat;
|
||||
@@ -71,8 +71,8 @@ WidgetBase {
|
||||
}
|
||||
|
||||
SnapLayout {
|
||||
orientation: Qt.Vertical
|
||||
id: verticalColumn
|
||||
orientation: Qt.Vertical
|
||||
|
||||
anchors.centerIn: parent
|
||||
spacing: Tokens.padding.extraSmall ?? 2
|
||||
|
||||
@@ -73,8 +73,7 @@ Item {
|
||||
anchors.topMargin: root.horizontal ? 0 : Tokens.spacing.small
|
||||
anchors.verticalCenter: root.horizontal ? parent.verticalCenter : undefined
|
||||
color: root.color
|
||||
font.family: metrics.font.family
|
||||
font.pointSize: metrics.font.pointSize
|
||||
font: metrics.font
|
||||
height: root.horizontal ? implicitHeight : implicitWidth
|
||||
opacity: root.current === this ? 1 : 0
|
||||
width: root.horizontal ? implicitWidth : implicitHeight
|
||||
|
||||
@@ -19,6 +19,8 @@ Item {
|
||||
readonly property int panelRadius: Tokens.rounding.largeIncreased + Tokens.padding.smaller
|
||||
readonly property int rounding: panelRadius - Tokens.padding.smaller
|
||||
readonly property int topMargin: 0
|
||||
readonly property font valueFont: Tokens.font.body.builders.small.weight(Font.DemiBold).build()
|
||||
|
||||
required property var wrapper
|
||||
|
||||
implicitHeight: vol.implicitHeight + Tokens.padding.smaller * 2
|
||||
@@ -48,7 +50,7 @@ Item {
|
||||
}
|
||||
|
||||
component VolumesTab: SnapLayout {
|
||||
orientation: Qt.Vertical
|
||||
orientation: Qt.Vertical
|
||||
spacing: 12
|
||||
|
||||
CustomRect {
|
||||
@@ -59,7 +61,7 @@ orientation: Qt.Vertical
|
||||
radius: root.rounding - vol.anchors.margins
|
||||
|
||||
SnapLayout {
|
||||
orientation: Qt.Vertical
|
||||
orientation: Qt.Vertical
|
||||
anchors.bottomMargin: Tokens.padding.small
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Tokens.padding.small
|
||||
@@ -79,7 +81,7 @@ orientation: Qt.Vertical
|
||||
CustomText {
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
||||
color: Qt.alpha(Colors.palette.m3onSurface, 0.7)
|
||||
font.bold: true
|
||||
font: root.valueFont
|
||||
text: qsTr("%1").arg(Audio.muted ? qsTr("Muted") : `${Math.round(Audio.volume * 100)}%`)
|
||||
}
|
||||
}
|
||||
@@ -157,7 +159,7 @@ orientation: Qt.Vertical
|
||||
}
|
||||
|
||||
SnapLayout {
|
||||
orientation: Qt.Vertical
|
||||
orientation: Qt.Vertical
|
||||
anchors.bottomMargin: Tokens.padding.small
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Tokens.padding.small
|
||||
@@ -177,7 +179,7 @@ orientation: Qt.Vertical
|
||||
CustomText {
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
||||
color: Qt.alpha(Colors.palette.m3onSurface, 0.7)
|
||||
font.bold: true
|
||||
font: root.valueFont
|
||||
text: qsTr("%1").arg(Audio.sourceMuted ? qsTr("Muted") : `${Math.round(Audio.sourceVolume * 100)}%`)
|
||||
}
|
||||
}
|
||||
@@ -281,7 +283,7 @@ orientation: Qt.Vertical
|
||||
}
|
||||
|
||||
SnapLayout {
|
||||
orientation: Qt.Vertical
|
||||
orientation: Qt.Vertical
|
||||
anchors.bottomMargin: Tokens.padding.small
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Tokens.padding.small
|
||||
@@ -302,7 +304,7 @@ orientation: Qt.Vertical
|
||||
CustomText {
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
||||
color: Qt.alpha(Colors.palette.m3onSurface, 0.7)
|
||||
font.bold: true
|
||||
font: root.valueFont
|
||||
text: qsTr("%1").arg(appBox.modelData.audio.muted ? qsTr("Muted") : `${Math.round(appBox.modelData.audio.volume * 100)}%`)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ Column {
|
||||
CustomText {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
color: Colors.palette.m3onError
|
||||
font.family: Config.appearance.font.family.mono
|
||||
font: Tokens.font.mono.small
|
||||
text: qsTr("Performance Degraded")
|
||||
}
|
||||
|
||||
@@ -127,6 +127,7 @@ Column {
|
||||
CustomText {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
color: Colors.palette.m3onError
|
||||
font: Tokens.font.label.small
|
||||
text: qsTr("Reason: %1").arg(PerformanceDegradationReason.toString(PowerProfiles.degradationReason))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user