Commit 93594f60 authored by Nate Graham's avatar Nate Graham 🔩
Browse files

Use font: instead of font.pointSize: where possible

Summary:
Otherwise we're discarding style information possibly set in
the user's small font choices when we want to set a smaller
font.

Test Plan: Stuff that's suposta look small still looks small

Reviewers: cblack, #plasma

Reviewed By: cblack, #plasma

Subscribers: ahiemstra, apol, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D29437
parent d228a44a
......@@ -51,7 +51,7 @@ Item {
width: parent ? parent.width : implicitWidth
wrapMode: Text.WordWrap
text: batteryItem.isBroken && typeof model.Capacity !== "undefined" ? i18n("This battery's health is at only %1% and should be replaced. Please contact your hardware vendor for more details.", model.Capacity) : ""
font.pointSize: !!detailsLayout.parent.inListView ? theme.smallestFont.pointSize : theme.defaultFont.pointSize
font: !!detailsLayout.parent.inListView ? theme.smallestFont : theme.defaultFont
visible: batteryItem.isBroken
}
......@@ -77,7 +77,7 @@ Item {
PropertyChanges {
target: detailsLabel
horizontalAlignment: modelData.value ? Text.AlignRight : Text.AlignLeft
font.pointSize: theme.smallestFont.pointSize
font: theme.smallestFont
width: parent ? parent.width / 2 : 0
elide: Text.ElideNone // eliding and height: implicitHeight causes loops
}
......
......@@ -39,7 +39,7 @@ RowLayout {
id: label
Layout.fillWidth: true
height: implicitHeight
font.pointSize: theme.smallestFont.pointSize
font: theme.smallestFont
wrapMode: Text.WordWrap
elide: Text.ElideRight
maximumLineCount: 3
......
......@@ -85,7 +85,7 @@ Item {
}
}
PlasmaComponents.Label {
font.pointSize: theme.smallestFont.pointSize
font: theme.smallestFont
color: theme.backgroundColor
maximumLineCount: 1
anchors {
......@@ -118,6 +118,6 @@ Item {
}
verticalAlignment: Text.AlignBottom
horizontalAlignment: Text.AlignCenter
font.pointSize: theme.smallestFont.pointSize
font: theme.smallestFont
}
}
Markdown is supported
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