Font: added per font family scaling. removed billboard font

This commit is contained in:
ItsLemmy
2025-09-29 21:31:45 -04:00
parent 1e8b122911
commit 4b13e89a64
65 changed files with 271 additions and 276 deletions
@@ -22,7 +22,7 @@ ColumnLayout {
NText {
text: root.label
font.pointSize: Style.fontSizeL * scaling
pointSize: Style.fontSizeL * scaling
color: Color.mSecondary
font.weight: Style.fontWeightMedium
Layout.fillWidth: true
@@ -79,7 +79,7 @@ ColumnLayout {
// Device name
NText {
text: modelData.name || modelData.deviceName
font.pointSize: Style.fontSizeM * scaling
pointSize: Style.fontSizeM * scaling
font.weight: Style.fontWeightMedium
elide: Text.ElideRight
color: getContentColor(Color.mOnSurface)
@@ -90,7 +90,7 @@ ColumnLayout {
NText {
text: BluetoothService.getStatusString(modelData)
visible: text !== ""
font.pointSize: Style.fontSizeXS * scaling
pointSize: Style.fontSizeXS * scaling
color: getContentColor(Color.mOnSurfaceVariant)
}
@@ -103,7 +103,7 @@ ColumnLayout {
// Device signal strength - "Unknown" when not connected
NText {
text: BluetoothService.getSignalStrength(modelData)
font.pointSize: Style.fontSizeXS * scaling
pointSize: Style.fontSizeXS * scaling
color: getContentColor(Color.mOnSurfaceVariant)
}
@@ -117,7 +117,7 @@ ColumnLayout {
NText {
visible: modelData.signalStrength > 0 && !modelData.pairing && !modelData.blocked
text: (modelData.signalStrength !== undefined && modelData.signalStrength > 0) ? modelData.signalStrength + "%" : ""
font.pointSize: Style.fontSizeXS * scaling
pointSize: Style.fontSizeXS * scaling
color: getContentColor(Color.mOnSurface)
}
}
@@ -126,7 +126,7 @@ ColumnLayout {
NText {
visible: modelData.batteryAvailable
text: BluetoothService.getBattery(modelData)
font.pointSize: Style.fontSizeXS * scaling
pointSize: Style.fontSizeXS * scaling
color: getContentColor(Color.mOnSurfaceVariant)
}
}
+5 -5
View File
@@ -36,7 +36,7 @@ NPanel {
NText {
text: I18n.tr("bluetooth.panel.title")
font.pointSize: Style.fontSizeL * scaling
pointSize: Style.fontSizeL * scaling
font.weight: Style.fontWeightBold
color: Color.mOnSurface
Layout.fillWidth: true
@@ -95,14 +95,14 @@ NPanel {
NText {
text: I18n.tr("bluetooth.panel.disabled")
font.pointSize: Style.fontSizeL * scaling
pointSize: Style.fontSizeL * scaling
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignHCenter
}
NText {
text: I18n.tr("bluetooth.panel.enable-message")
font.pointSize: Style.fontSizeS * scaling
pointSize: Style.fontSizeS * scaling
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignHCenter
}
@@ -200,14 +200,14 @@ NPanel {
NText {
text: I18n.tr("bluetooth.panel.scanning")
font.pointSize: Style.fontSizeL * scaling
pointSize: Style.fontSizeL * scaling
color: Color.mOnSurface
}
}
NText {
text: I18n.tr("bluetooth.panel.pairing-mode")
font.pointSize: Style.fontSizeM * scaling
pointSize: Style.fontSizeM * scaling
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignHCenter
}
+5 -5
View File
@@ -43,7 +43,7 @@ NPanel {
text: grid.title
Layout.fillWidth: true
horizontalAlignment: Text.AlignHCenter
font.pointSize: Style.fontSizeM * scaling
pointSize: Style.fontSizeM * scaling
font.weight: Style.fontWeightBold
color: Color.mPrimary
}
@@ -83,7 +83,7 @@ NPanel {
anchors.centerIn: parent
text: I18n.tr("calendar.panel.week")
color: Color.mOutline
font.pointSize: Style.fontSizeXS * scaling
pointSize: Style.fontSizeXS * scaling
font.weight: Style.fontWeightRegular
horizontalAlignment: Text.AlignHCenter
}
@@ -113,7 +113,7 @@ NPanel {
return Qt.locale().dayName(dayIndex, Locale.ShortFormat)
}
color: Color.mSecondary
font.pointSize: Style.fontSizeM * scaling
pointSize: Style.fontSizeM * scaling
font.weight: Style.fontWeightBold
horizontalAlignment: Text.AlignHCenter
}
@@ -148,7 +148,7 @@ NPanel {
NText {
anchors.centerIn: parent
color: Color.mOutline
font.pointSize: Style.fontSizeXS * scaling
pointSize: Style.fontSizeXS * scaling
font.weight: Style.fontWeightBold
text: {
// Calculate the date shown in the first column of this row
@@ -229,7 +229,7 @@ NPanel {
text: model.day
color: model.today ? Color.mOnPrimary : Color.mOnSurface
opacity: model.month === grid.month ? Style.opacityHeavy : Style.opacityLight
font.pointSize: Style.fontSizeM * scaling
pointSize: Style.fontSizeM * scaling
font.weight: model.today ? Style.fontWeightBold : Style.fontWeightRegular
}
+2 -2
View File
@@ -84,8 +84,8 @@ Item {
return centerX + offset
}
text: root.text + root.suffix
font.family: Settings.data.ui.fontFixed
font.pointSize: textSize
family: Settings.data.ui.fontFixed
pointSize: textSize
font.weight: Style.fontWeightBold
color: forceOpen ? Color.mOnSurface : Color.mPrimary
visible: revealed
+2 -2
View File
@@ -98,8 +98,8 @@ Item {
return offset
}
text: root.text + root.suffix
font.family: Settings.data.ui.fontFixed
font.pointSize: textSize
family: Settings.data.ui.fontFixed
pointSize: textSize
font.weight: Style.fontWeightMedium
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
+2 -2
View File
@@ -160,7 +160,7 @@ PopupWindow {
Layout.fillWidth: true
color: (modelData?.enabled ?? true) ? (mouseArea.containsMouse ? Color.mOnTertiary : Color.mOnSurface) : Color.mOnSurfaceVariant
text: modelData?.text !== "" ? modelData?.text.replace(/[\n\r]+/g, ' ') : "..."
font.pointSize: Style.fontSizeS * scaling
pointSize: Style.fontSizeS * scaling
verticalAlignment: Text.AlignVCenter
wrapMode: Text.WordWrap
}
@@ -175,7 +175,7 @@ PopupWindow {
NIcon {
icon: modelData?.hasChildren ? "menu" : ""
font.pointSize: Style.fontSizeS * scaling
pointSize: Style.fontSizeS * scaling
verticalAlignment: Text.AlignVCenter
visible: modelData?.hasChildren ?? false
color: (mouseArea.containsMouse ? Color.mOnTertiary : Color.mOnSurface)
+17 -17
View File
@@ -41,7 +41,7 @@ NPanel {
NText {
text: I18n.tr("wifi.panel.title")
font.pointSize: Style.fontSizeL * scaling
pointSize: Style.fontSizeL * scaling
font.weight: Style.fontWeightBold
color: Color.mOnSurface
Layout.fillWidth: true
@@ -99,7 +99,7 @@ NPanel {
NText {
text: NetworkService.lastError
color: Color.mError
font.pointSize: Style.fontSizeS * scaling
pointSize: Style.fontSizeS * scaling
wrapMode: Text.Wrap
Layout.fillWidth: true
}
@@ -137,14 +137,14 @@ NPanel {
NText {
text: I18n.tr("wifi.panel.disabled")
font.pointSize: Style.fontSizeL * scaling
pointSize: Style.fontSizeL * scaling
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignHCenter
}
NText {
text: I18n.tr("wifi.panel.enable-message")
font.pointSize: Style.fontSizeS * scaling
pointSize: Style.fontSizeS * scaling
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignHCenter
}
@@ -173,7 +173,7 @@ NPanel {
NText {
text: I18n.tr("wifi.panel.searching")
font.pointSize: Style.fontSizeNormal * scaling
pointSize: Style.fontSizeNormal * scaling
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignHCenter
}
@@ -252,7 +252,7 @@ NPanel {
NText {
text: modelData.ssid
font.pointSize: Style.fontSizeNormal * scaling
pointSize: Style.fontSizeNormal * scaling
font.weight: modelData.connected ? Style.fontWeightBold : Style.fontWeightMedium
color: Color.mOnSurface
elide: Text.ElideRight
@@ -266,19 +266,19 @@ NPanel {
text: I18n.tr("system.signal-strength", {
"signal": modelData.signal
})
font.pointSize: Style.fontSizeXXS * scaling
pointSize: Style.fontSizeXXS * scaling
color: Color.mOnSurfaceVariant
}
NText {
text: "•"
font.pointSize: Style.fontSizeXXS * scaling
pointSize: Style.fontSizeXXS * scaling
color: Color.mOnSurfaceVariant
}
NText {
text: NetworkService.isSecured(modelData.security) ? modelData.security : "Open"
font.pointSize: Style.fontSizeXXS * scaling
pointSize: Style.fontSizeXXS * scaling
color: Color.mOnSurfaceVariant
}
@@ -298,7 +298,7 @@ NPanel {
id: connectedText
anchors.centerIn: parent
text: I18n.tr("wifi.panel.connected")
font.pointSize: Style.fontSizeXXS * scaling
pointSize: Style.fontSizeXXS * scaling
color: Color.mOnPrimary
}
}
@@ -314,7 +314,7 @@ NPanel {
id: disconnectingText
anchors.centerIn: parent
text: I18n.tr("wifi.panel.disconnecting")
font.pointSize: Style.fontSizeXXS * scaling
pointSize: Style.fontSizeXXS * scaling
color: Color.mOnPrimary
}
}
@@ -330,7 +330,7 @@ NPanel {
id: forgettingText
anchors.centerIn: parent
text: I18n.tr("wifi.panel.forgetting")
font.pointSize: Style.fontSizeXXS * scaling
pointSize: Style.fontSizeXXS * scaling
color: Color.mOnPrimary
}
}
@@ -348,7 +348,7 @@ NPanel {
id: savedText
anchors.centerIn: parent
text: I18n.tr("wifi.panel.saved")
font.pointSize: Style.fontSizeXXS * scaling
pointSize: Style.fontSizeXXS * scaling
color: Color.mOnSurfaceVariant
}
}
@@ -456,12 +456,12 @@ NPanel {
}
}
Text {
NText {
visible: parent.text.length === 0
anchors.verticalCenter: parent.verticalCenter
text: I18n.tr("wifi.panel.enter-password")
color: Color.mOnSurfaceVariant
font.pointSize: Style.fontSizeS * scaling
pointSize: Style.fontSizeS * scaling
}
}
}
@@ -514,7 +514,7 @@ NPanel {
NText {
text: I18n.tr("wifi.panel.forget-network")
font.pointSize: Style.fontSizeS * scaling
pointSize: Style.fontSizeS * scaling
color: Color.mError
Layout.fillWidth: true
}
@@ -564,7 +564,7 @@ NPanel {
NText {
text: I18n.tr("wifi.panel.no-networks")
font.pointSize: Style.fontSizeL * scaling
pointSize: Style.fontSizeL * scaling
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignHCenter
}
+2 -2
View File
@@ -108,7 +108,7 @@ Item {
id: fullTitleMetrics
visible: false
text: windowTitle
font.pointSize: Style.fontSizeS * scaling
pointSize: Style.fontSizeS * scaling
font.weight: Style.fontWeightMedium
}
@@ -245,7 +245,7 @@ Item {
NText {
id: titleText
text: windowTitle
font.pointSize: Style.fontSizeS * scaling
pointSize: Style.fontSizeS * scaling
font.weight: Style.fontWeightMedium
verticalAlignment: Text.AlignVCenter
color: Color.mOnSurface
+4 -4
View File
@@ -65,8 +65,8 @@ Rectangle {
NText {
visible: text !== ""
text: modelData
font.family: useMonospacedFont ? Settings.data.ui.fontFixed : Settings.data.ui.fontDefault
font.pointSize: {
family: useMonospacedFont ? Settings.data.ui.fontFixed : Settings.data.ui.fontDefault
pointSize: {
if (repeater.model.length == 1) {
return Style.fontSizeS * scaling
} else {
@@ -95,8 +95,8 @@ Rectangle {
delegate: NText {
visible: text !== ""
text: modelData
font.family: useMonospacedFont ? Settings.data.ui.fontFixed : Settings.data.ui.fontDefault
font.pointSize: Style.fontSizeS * scaling
family: useMonospacedFont ? Settings.data.ui.fontFixed : Settings.data.ui.fontDefault
pointSize: Style.fontSizeS * scaling
font.weight: Style.fontWeightBold
color: usePrimaryColor ? Color.mPrimary : Color.mOnSurface
wrapMode: Text.WordWrap
+1 -1
View File
@@ -275,7 +275,7 @@ Item {
NText {
id: titleText
text: getTitle()
font.pointSize: Style.fontSizeS * scaling
pointSize: Style.fontSizeS * scaling
font.weight: Style.fontWeightMedium
verticalAlignment: Text.AlignVCenter
color: Color.mOnSurface
+12 -12
View File
@@ -114,8 +114,8 @@ Rectangle {
NText {
text: `${Math.round(SystemStatService.cpuUsage)}%`
font.family: Settings.data.ui.fontFixed
font.pointSize: textSize
family: Settings.data.ui.fontFixed
pointSize: textSize
font.weight: Style.fontWeightMedium
Layout.alignment: Qt.AlignCenter
Layout.preferredWidth: isVertical ? -1 : percentTextWidth
@@ -155,8 +155,8 @@ Rectangle {
NText {
text: `${Math.round(SystemStatService.cpuTemp)}°`
font.family: Settings.data.ui.fontFixed
font.pointSize: textSize
family: Settings.data.ui.fontFixed
pointSize: textSize
font.weight: Style.fontWeightMedium
Layout.alignment: Qt.AlignCenter
Layout.preferredWidth: isVertical ? -1 : tempTextWidth
@@ -196,8 +196,8 @@ Rectangle {
NText {
text: showMemoryAsPercent ? `${Math.round(SystemStatService.memPercent)}%` : `${SystemStatService.memGb.toFixed(1)}G`
font.family: Settings.data.ui.fontFixed
font.pointSize: textSize
family: Settings.data.ui.fontFixed
pointSize: textSize
font.weight: Style.fontWeightMedium
Layout.alignment: Qt.AlignCenter
Layout.preferredWidth: isVertical ? -1 : (showMemoryAsPercent ? percentTextWidth : memTextWidth)
@@ -237,8 +237,8 @@ Rectangle {
NText {
text: isVertical ? SystemStatService.formatCompactSpeed(SystemStatService.rxSpeed) : SystemStatService.formatSpeed(SystemStatService.rxSpeed)
font.family: Settings.data.ui.fontFixed
font.pointSize: textSize
family: Settings.data.ui.fontFixed
pointSize: textSize
font.weight: Style.fontWeightMedium
Layout.alignment: Qt.AlignCenter
Layout.preferredWidth: isVertical ? -1 : memTextWidth
@@ -278,8 +278,8 @@ Rectangle {
NText {
text: isVertical ? SystemStatService.formatCompactSpeed(SystemStatService.txSpeed) : SystemStatService.formatSpeed(SystemStatService.txSpeed)
font.family: Settings.data.ui.fontFixed
font.pointSize: textSize
family: Settings.data.ui.fontFixed
pointSize: textSize
font.weight: Style.fontWeightMedium
Layout.alignment: Qt.AlignCenter
Layout.preferredWidth: isVertical ? -1 : memTextWidth
@@ -319,8 +319,8 @@ Rectangle {
NText {
text: `${SystemStatService.diskPercent}%`
font.family: Settings.data.ui.fontFixed
font.pointSize: textSize
family: Settings.data.ui.fontFixed
pointSize: textSize
font.weight: Style.fontWeightMedium
Layout.alignment: Qt.AlignCenter
Layout.preferredWidth: isVertical ? -1 : percentTextWidth
+7 -6
View File
@@ -7,6 +7,7 @@ import Quickshell
import Quickshell.Io
import qs.Commons
import qs.Services
import qs.Widgets
Item {
id: root
@@ -274,7 +275,7 @@ Item {
Loader {
active: (labelMode !== "none")
sourceComponent: Component {
Text {
NText {
x: (pill.width - width) / 2
y: (pill.height - height) / 2 + (height - contentHeight) / 2
text: {
@@ -284,9 +285,9 @@ Item {
return model.idx.toString()
}
}
font.pointSize: model.isFocused ? workspacePillContainer.height * 0.45 : workspacePillContainer.height * 0.42
family: Settings.data.ui.fontFixed
pointSize: model.isFocused ? workspacePillContainer.height * 0.45 : workspacePillContainer.height * 0.42
font.capitalization: Font.AllUppercase
font.family: Settings.data.ui.fontFixed
font.weight: Style.fontWeightBold
wrapMode: Text.Wrap
color: {
@@ -418,7 +419,7 @@ Item {
Loader {
active: (labelMode !== "none")
sourceComponent: Component {
Text {
NText {
x: (pillVertical.width - width) / 2
y: (pillVertical.height - height) / 2 + (height - contentHeight) / 2
text: {
@@ -428,9 +429,9 @@ Item {
return model.idx.toString()
}
}
font.pointSize: model.isFocused ? workspacePillContainerVertical.width * 0.45 : workspacePillContainerVertical.width * 0.42
family: Settings.data.ui.fontFixed
pointSize: model.isFocused ? workspacePillContainerVertical.width * 0.45 : workspacePillContainerVertical.width * 0.42
font.capitalization: Font.AllUppercase
font.family: Settings.data.ui.fontFixed
font.weight: Style.fontWeightBold
wrapMode: Text.Wrap
color: {