refactor: migrate background/winfo/session to new font API
This commit is contained in:
parent
f639b04310
commit
61555294e6
6 changed files with 19 additions and 30 deletions
|
|
@ -81,14 +81,13 @@ Item {
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: Time.hourStr
|
text: Time.hourStr
|
||||||
font.pointSize: Tokens.font.size.extraLarge * 3 * root.clockScale
|
font: Tokens.font.clock.size(Tokens.font.headline.medium.pointSize * 3 * root.clockScale).weight(Font.Bold).build()
|
||||||
font.weight: Font.Bold
|
|
||||||
color: root.safePrimary
|
color: root.safePrimary
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: ":"
|
text: ":"
|
||||||
font.pointSize: Tokens.font.size.extraLarge * 3 * root.clockScale
|
font: Tokens.font.clock.size(Tokens.font.headline.medium.pointSize * 3 * root.clockScale).build()
|
||||||
color: root.safeTertiary
|
color: root.safeTertiary
|
||||||
opacity: 0.8
|
opacity: 0.8
|
||||||
Layout.topMargin: -Tokens.padding.large * 1.5 * root.clockScale
|
Layout.topMargin: -Tokens.padding.large * 1.5 * root.clockScale
|
||||||
|
|
@ -96,8 +95,7 @@ Item {
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: Time.minuteStr
|
text: Time.minuteStr
|
||||||
font.pointSize: Tokens.font.size.extraLarge * 3 * root.clockScale
|
font: Tokens.font.clock.size(Tokens.font.headline.medium.pointSize * 3 * root.clockScale).weight(Font.Bold).build()
|
||||||
font.weight: Font.Bold
|
|
||||||
color: root.safeSecondary
|
color: root.safeSecondary
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -111,7 +109,7 @@ Item {
|
||||||
|
|
||||||
sourceComponent: StyledText {
|
sourceComponent: StyledText {
|
||||||
text: Time.amPmStr
|
text: Time.amPmStr
|
||||||
font.pointSize: Tokens.font.size.large * root.clockScale
|
font: Tokens.font.clock.size(Tokens.font.title.medium.pointSize * root.clockScale).build()
|
||||||
color: root.safeSecondary
|
color: root.safeSecondary
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -132,24 +130,19 @@ Item {
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: Time.format("MMMM").toUpperCase()
|
text: Time.format("MMMM").toUpperCase()
|
||||||
font.pointSize: Tokens.font.size.large * root.clockScale
|
font: Tokens.font.clock.size(Tokens.font.title.medium.pointSize * root.clockScale).letterSpacing(4).weight(Font.Bold).build()
|
||||||
font.letterSpacing: 4
|
|
||||||
font.weight: Font.Bold
|
|
||||||
color: root.safeSecondary
|
color: root.safeSecondary
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: Time.format("dd")
|
text: Time.format("dd")
|
||||||
font.pointSize: Tokens.font.size.extraLarge * root.clockScale
|
font: Tokens.font.clock.size(Tokens.font.headline.medium.pointSize * root.clockScale).letterSpacing(2).weight(Font.Medium).build()
|
||||||
font.letterSpacing: 2
|
|
||||||
font.weight: Font.Medium
|
|
||||||
color: root.safePrimary
|
color: root.safePrimary
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: Time.format("dddd")
|
text: Time.format("dddd")
|
||||||
font.pointSize: Tokens.font.size.larger * root.clockScale
|
font: Tokens.font.clock.size(Tokens.font.body.large.pointSize * root.clockScale).letterSpacing(2).build()
|
||||||
font.letterSpacing: 2
|
|
||||||
color: root.safeSecondary
|
color: root.safeSecondary
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ Item {
|
||||||
MaterialIcon {
|
MaterialIcon {
|
||||||
text: "sentiment_stressed"
|
text: "sentiment_stressed"
|
||||||
color: Colours.palette.m3onSurfaceVariant
|
color: Colours.palette.m3onSurfaceVariant
|
||||||
font.pointSize: Tokens.font.size.extraLarge * 5
|
font: Tokens.font.icon.builders.extraLarge.size(Tokens.font.icon.extraLarge.pointSize * 5).build()
|
||||||
}
|
}
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
|
|
@ -58,8 +58,7 @@ Item {
|
||||||
StyledText {
|
StyledText {
|
||||||
text: qsTr("Wallpaper missing?")
|
text: qsTr("Wallpaper missing?")
|
||||||
color: Colours.palette.m3onSurfaceVariant
|
color: Colours.palette.m3onSurfaceVariant
|
||||||
font.pointSize: Tokens.font.size.extraLarge * 2
|
font: Tokens.font.body.builders.large.size(28 * 2).weight(Font.Bold).build()
|
||||||
font.bold: true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledRect {
|
StyledRect {
|
||||||
|
|
@ -91,7 +90,7 @@ Item {
|
||||||
|
|
||||||
text: qsTr("Set it now!")
|
text: qsTr("Set it now!")
|
||||||
color: Colours.palette.m3onPrimary
|
color: Colours.palette.m3onPrimary
|
||||||
font.pointSize: Tokens.font.size.large
|
font: Tokens.font.body.large
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -125,8 +125,7 @@ Column {
|
||||||
|
|
||||||
text: button.icon
|
text: button.icon
|
||||||
color: button.activeFocus ? Colours.palette.m3onSecondaryContainer : Colours.palette.m3onSurface
|
color: button.activeFocus ? Colours.palette.m3onSecondaryContainer : Colours.palette.m3onSurface
|
||||||
font.pointSize: Tokens.font.size.extraLarge
|
font: Tokens.font.icon.builders.extraLarge.weight(500).build()
|
||||||
font.weight: 500
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ ColumnLayout {
|
||||||
animate: true
|
animate: true
|
||||||
text: root.moveToWsExpanded ? "expand_more" : "keyboard_arrow_right"
|
text: root.moveToWsExpanded ? "expand_more" : "keyboard_arrow_right"
|
||||||
color: Colours.palette.m3onPrimary
|
color: Colours.palette.m3onPrimary
|
||||||
font.pointSize: Tokens.font.size.large
|
font: Tokens.font.icon.large
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -161,7 +161,7 @@ ColumnLayout {
|
||||||
|
|
||||||
animate: true
|
animate: true
|
||||||
color: parent.onColor
|
color: parent.onColor
|
||||||
font.pointSize: Tokens.font.size.normal
|
font: Tokens.font.body.medium
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,15 +19,14 @@ ColumnLayout {
|
||||||
text: root.client?.title ?? qsTr("No active client")
|
text: root.client?.title ?? qsTr("No active client")
|
||||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
|
|
||||||
font.pointSize: Tokens.font.size.large
|
font: Tokens.font.body.builders.large.weight(500).build()
|
||||||
font.weight: 500
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: root.client?.lastIpcObject.class ?? qsTr("No active client")
|
text: root.client?.lastIpcObject.class ?? qsTr("No active client")
|
||||||
color: Colours.palette.m3tertiary
|
color: Colours.palette.m3tertiary
|
||||||
|
|
||||||
font.pointSize: Tokens.font.size.larger
|
font: Tokens.font.body.large
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledRect {
|
StyledRect {
|
||||||
|
|
@ -149,7 +148,7 @@ ColumnLayout {
|
||||||
|
|
||||||
text: detail.text
|
text: detail.text
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
font.pointSize: Tokens.font.size.normal
|
font: Tokens.font.body.medium
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,22 +44,21 @@ Item {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
text: "web_asset_off"
|
text: "web_asset_off"
|
||||||
color: Colours.palette.m3outline
|
color: Colours.palette.m3outline
|
||||||
font.pointSize: Tokens.font.size.extraLarge * 3
|
font: Tokens.font.icon.builders.extraLarge.size(Tokens.font.icon.extraLarge.pointSize * 3).build()
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
text: qsTr("No active client")
|
text: qsTr("No active client")
|
||||||
color: Colours.palette.m3outline
|
color: Colours.palette.m3outline
|
||||||
font.pointSize: Tokens.font.size.extraLarge
|
font: Tokens.font.body.builders.large.size(28).weight(500).build()
|
||||||
font.weight: 500
|
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
text: qsTr("Try switching to a window")
|
text: qsTr("Try switching to a window")
|
||||||
color: Colours.palette.m3outline
|
color: Colours.palette.m3outline
|
||||||
font.pointSize: Tokens.font.size.large
|
font: Tokens.font.body.large
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue