Don't hardcode fonts

Fix hardcoded fonts (again)
This commit is contained in:
Loren Burkholder 2021-07-20 12:53:16 -04:00
parent 152acdc4a5
commit fa06881c49
3 changed files with 8 additions and 8 deletions

View file

@ -111,13 +111,13 @@ ApplicationWindow {
Label { Label {
text: model.displayName text: model.displayName
color: TimelineManager.userColor(model ? model.mxid : "", Nheko.colors.window) color: TimelineManager.userColor(model ? model.mxid : "", Nheko.colors.window)
font.pointSize: 12 font.pointSize: fontMetrics.font.pointSize
} }
Label { Label {
text: model.mxid text: model.mxid
color: Nheko.colors.buttonText color: Nheko.colors.buttonText
font.pointSize: 10 font.pointSize: fontMetrics.font.pointSize * 0.9
} }
Item { Item {

View file

@ -43,7 +43,7 @@ ApplicationWindow {
} }
Label { Label {
font.pixelSize: 24 font.pixelSize: fontMetrics.font.pixelSize * 2
text: members.memberCount + (members.memberCount === 1 ? qsTr(" person in ") : qsTr(" people in ")) + members.roomName text: members.memberCount + (members.memberCount === 1 ? qsTr(" person in ") : qsTr(" people in ")) + members.roomName
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
} }
@ -97,13 +97,13 @@ ApplicationWindow {
Label { Label {
text: model.displayName text: model.displayName
color: TimelineManager.userColor(model ? model.mxid : "", Nheko.colors.window) color: TimelineManager.userColor(model ? model.mxid : "", Nheko.colors.window)
font.pointSize: 12 font.pointSize: fontMetrics.font.pointSize
} }
Label { Label {
text: model.mxid text: model.mxid
color: Nheko.colors.buttonText color: Nheko.colors.buttonText
font.pointSize: 10 font.pointSize: fontMetrics.font.pointSize * 0.9
} }
Item { Item {

View file

@ -98,7 +98,7 @@ ApplicationWindow {
MatrixText { MatrixText {
text: roomSettings.roomName text: roomSettings.roomName
font.pixelSize: 24 font.pixelSize: fontMetrics.font.pixelSize * 2
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
} }
@ -264,7 +264,7 @@ ApplicationWindow {
MatrixText { MatrixText {
text: roomSettings.roomId text: roomSettings.roomId
font.pixelSize: 14 font.pixelSize: fontMetrics.font.pixelSize * 1.2
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
} }
@ -274,7 +274,7 @@ ApplicationWindow {
MatrixText { MatrixText {
text: roomSettings.roomVersion text: roomSettings.roomVersion
font.pixelSize: 14 font.pixelSize: fontMetrics.font.pixelSize * 1.2
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
} }