Commit 9d0a71d7 authored by Nate Graham's avatar Nate Graham
Browse files

kcms/fonts: show warning when user tries to set a non-integer font size

It triggers https://bugreports.qt.io/browse/QTBUG-92006, and we need to
warn users about that.

CCBUG: 432372
parent 0cce4af2
Pipeline #170958 passed with stage
in 12 minutes and 54 seconds
......@@ -64,6 +64,29 @@ KCM.SimpleKCM {
actions: [ kscreenAction ]
}
Kirigami.InlineMessage {
id: fractionalFontSizeWarning
Layout.fillWidth: true
showCloseButton: true
type: Kirigami.MessageType.Warning
text: i18n("Decimal font sizes can cause text layout problems in some applications. Consider using only integer font sizes.")
// Specifically, it will trigger https://bugreports.qt.io/browse/QTBUG-92006,
// but we don't mention that in the message because that would be too technical
// for users.
Connections {
target: kcm
function onFontsHaveChanged() {
fractionalFontSizeWarning.visible =
!Number.isInteger(generalFontWidget.font.pointSize)
|| !Number.isInteger(fixedWidthFontWidget.font.pointSize)
|| !Number.isInteger(smallFontWidget.font.pointSize)
|| !Number.isInteger(toolbarFontWidget.font.pointSize)
|| !Number.isInteger(menuFontWidget.font.pointSize)
}
}
}
Kirigami.InlineMessage {
id: dpiTwiddledMessage
Layout.fillWidth: true
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment