refactor: migrate launcher to new font API
This commit is contained in:
parent
e2349f2202
commit
a3e84b555e
7 changed files with 20 additions and 22 deletions
|
|
@ -119,7 +119,7 @@ Item {
|
||||||
MaterialIcon {
|
MaterialIcon {
|
||||||
text: root.state === "wallpapers" ? "wallpaper_slideshow" : "manage_search"
|
text: root.state === "wallpapers" ? "wallpaper_slideshow" : "manage_search"
|
||||||
color: Colours.palette.m3onSurfaceVariant
|
color: Colours.palette.m3onSurfaceVariant
|
||||||
font.pointSize: Tokens.font.size.extraLarge
|
font: Tokens.font.icon.extraLarge
|
||||||
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
|
|
@ -130,14 +130,13 @@ Item {
|
||||||
StyledText {
|
StyledText {
|
||||||
text: root.state === "wallpapers" ? qsTr("No wallpapers found") : qsTr("No results")
|
text: root.state === "wallpapers" ? qsTr("No wallpapers found") : qsTr("No results")
|
||||||
color: Colours.palette.m3onSurfaceVariant
|
color: Colours.palette.m3onSurfaceVariant
|
||||||
font.pointSize: Tokens.font.size.larger
|
font: Tokens.font.body.builders.large.weight(500).build()
|
||||||
font.weight: 500
|
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: root.state === "wallpapers" && Wallpapers.list.length === 0 ? qsTr("Try putting some wallpapers in %1").arg(Paths.shortenHome(Paths.wallsdir)) : qsTr("Try searching for something else")
|
text: root.state === "wallpapers" && Wallpapers.list.length === 0 ? qsTr("Try putting some wallpapers in %1").arg(Paths.shortenHome(Paths.wallsdir)) : qsTr("Try searching for something else")
|
||||||
color: Colours.palette.m3onSurfaceVariant
|
color: Colours.palette.m3onSurfaceVariant
|
||||||
font.pointSize: Tokens.font.size.normal
|
font: Tokens.font.body.medium
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ Item {
|
||||||
id: icon
|
id: icon
|
||||||
|
|
||||||
text: root.modelData?.icon ?? ""
|
text: root.modelData?.icon ?? ""
|
||||||
font.pointSize: Tokens.font.size.extraLarge
|
font: Tokens.font.icon.extraLarge
|
||||||
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
|
|
@ -46,14 +46,14 @@ Item {
|
||||||
id: name
|
id: name
|
||||||
|
|
||||||
text: root.modelData?.name ?? ""
|
text: root.modelData?.name ?? ""
|
||||||
font.pointSize: Tokens.font.size.normal
|
font: Tokens.font.body.medium
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
id: desc
|
id: desc
|
||||||
|
|
||||||
text: root.modelData?.desc ?? ""
|
text: root.modelData?.desc ?? ""
|
||||||
font.pointSize: Tokens.font.size.small
|
font: Tokens.font.body.small
|
||||||
color: Colours.palette.m3outline
|
color: Colours.palette.m3outline
|
||||||
|
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
|
|
|
||||||
|
|
@ -54,14 +54,14 @@ Item {
|
||||||
id: name
|
id: name
|
||||||
|
|
||||||
text: root.modelData?.name ?? ""
|
text: root.modelData?.name ?? ""
|
||||||
font.pointSize: Tokens.font.size.normal
|
font: Tokens.font.body.medium
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
id: comment
|
id: comment
|
||||||
|
|
||||||
text: (root.modelData?.comment || root.modelData?.genericName || root.modelData?.name) ?? ""
|
text: (root.modelData?.comment || root.modelData?.genericName || root.modelData?.name) ?? ""
|
||||||
font.pointSize: Tokens.font.size.small
|
font: Tokens.font.body.small
|
||||||
color: Colours.palette.m3outline
|
color: Colours.palette.m3outline
|
||||||
|
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ Item {
|
||||||
|
|
||||||
MaterialIcon {
|
MaterialIcon {
|
||||||
text: "function"
|
text: "function"
|
||||||
font.pointSize: Tokens.font.size.extraLarge
|
font: Tokens.font.icon.extraLarge
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -94,7 +94,7 @@ Item {
|
||||||
|
|
||||||
text: qsTr("Open in calculator")
|
text: qsTr("Open in calculator")
|
||||||
color: Colours.palette.m3onTertiary
|
color: Colours.palette.m3onTertiary
|
||||||
font.pointSize: Tokens.font.size.normal
|
font: Tokens.font.label.medium
|
||||||
|
|
||||||
opacity: stateLayer.containsMouse ? 1 : 0
|
opacity: stateLayer.containsMouse ? 1 : 0
|
||||||
|
|
||||||
|
|
@ -112,7 +112,7 @@ Item {
|
||||||
|
|
||||||
text: "open_in_new"
|
text: "open_in_new"
|
||||||
color: Colours.palette.m3onTertiary
|
color: Colours.palette.m3onTertiary
|
||||||
font.pointSize: Tokens.font.size.large
|
font: Tokens.font.icon.large
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on implicitWidth {
|
Behavior on implicitWidth {
|
||||||
|
|
|
||||||
|
|
@ -69,12 +69,12 @@ Item {
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: root.modelData?.flavour ?? ""
|
text: root.modelData?.flavour ?? ""
|
||||||
font.pointSize: Tokens.font.size.normal
|
font: Tokens.font.body.medium
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: root.modelData?.name ?? ""
|
text: root.modelData?.name ?? ""
|
||||||
font.pointSize: Tokens.font.size.small
|
font: Tokens.font.body.small
|
||||||
color: Colours.palette.m3outline
|
color: Colours.palette.m3outline
|
||||||
|
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
|
|
@ -95,7 +95,7 @@ Item {
|
||||||
sourceComponent: MaterialIcon {
|
sourceComponent: MaterialIcon {
|
||||||
text: "check"
|
text: "check"
|
||||||
color: Colours.palette.m3onSurfaceVariant
|
color: Colours.palette.m3onSurfaceVariant
|
||||||
font.pointSize: Tokens.font.size.large
|
font: Tokens.font.icon.large
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ Item {
|
||||||
id: icon
|
id: icon
|
||||||
|
|
||||||
text: root.modelData?.icon ?? ""
|
text: root.modelData?.icon ?? ""
|
||||||
font.pointSize: Tokens.font.size.extraLarge
|
font: Tokens.font.icon.extraLarge
|
||||||
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
|
|
@ -45,12 +45,12 @@ Item {
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: root.modelData?.name ?? ""
|
text: root.modelData?.name ?? ""
|
||||||
font.pointSize: Tokens.font.size.normal
|
font: Tokens.font.body.medium
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: root.modelData?.description ?? ""
|
text: root.modelData?.description ?? ""
|
||||||
font.pointSize: Tokens.font.size.small
|
font: Tokens.font.body.small
|
||||||
color: Colours.palette.m3outline
|
color: Colours.palette.m3outline
|
||||||
|
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
|
|
@ -71,7 +71,7 @@ Item {
|
||||||
sourceComponent: MaterialIcon {
|
sourceComponent: MaterialIcon {
|
||||||
text: "check"
|
text: "check"
|
||||||
color: Colours.palette.m3onSurfaceVariant
|
color: Colours.palette.m3onSurfaceVariant
|
||||||
font.pointSize: Tokens.font.size.large
|
font: Tokens.font.icon.large
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,8 +58,7 @@ Item {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
text: "image"
|
text: "image"
|
||||||
color: Colours.tPalette.m3outline
|
color: Colours.tPalette.m3outline
|
||||||
font.pointSize: Tokens.font.size.extraLarge * 2
|
font: Tokens.font.icon.builders.extraLarge.size(Tokens.font.icon.extraLarge.pointSize * 2).weight(600).build()
|
||||||
font.weight: 600
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CachingImage {
|
CachingImage {
|
||||||
|
|
@ -83,7 +82,7 @@ Item {
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
renderType: Text.QtRendering
|
renderType: Text.QtRendering
|
||||||
text: root.modelData.relativePath
|
text: root.modelData.relativePath
|
||||||
font.pointSize: Tokens.font.size.normal
|
font: Tokens.font.label.medium
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on scale {
|
Behavior on scale {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue