Commit d3aa8b07 authored by Krešimir Čohar's avatar Krešimir Čohar

[sddm-theme/lock screen] Overhaul font sizes

Summary:
This patch:
- tells the login screen to modify the font size specified in theme.conf and the lock screen to modify the user's default theme's font size instead
- makes sure that the login screen session and keyboard buttons take this new approach too
- raises the font size of "Start New Session" on the lock screen (to match the rest)
- raises the artist/track font sizes (to match the password field)

Test Plan:
This patch resolves the problem of

(1) The fonts on the login screen and

{F6676520}

(2) the fonts on the lock screen

{F6676524}

not having matching sizes.

Reviewers: #vdg, #plasma, ngraham, filipf

Reviewed By: #vdg, ngraham, filipf

Subscribers: davidedmundson, plasma-devel

Tags: #plasma

Maniphest Tasks: T10325

Differential Revision: https://phabricator.kde.org/D19631
parent f899ccdc
......@@ -30,6 +30,7 @@ Item {
property alias labelRendering: label.renderType
property alias circleOpacity: iconCircle.opacity
property alias circleVisiblity: iconCircle.visible
property int fontSize: config.fontSize
readonly property bool softwareRendering: GraphicsInfo.api === GraphicsInfo.Software
signal clicked
......@@ -79,7 +80,7 @@ Item {
PlasmaComponents.Label {
id: label
font.pointSize: theme.defaultFont.pointSize + 1
font.pointSize: Math.max(fontSize + 1,theme.defaultFont.pointSize + 1)
anchors {
top: icon.bottom
topMargin: (softwareRendering ? 1.5 : 1) * units.smallSpacing
......
......@@ -45,6 +45,7 @@ Row {
PlasmaComponents.Label {
id: batteryLabel
font.pointSize: config.fontSize
height: undefined
text: i18nd("plasma_lookandfeel_org.kde.lookandfeel","%1%", battery.percent)
Accessible.name: i18nd("plasma_lookandfeel_org.kde.lookandfeel","Battery at %1%", battery.percent)
......
......@@ -25,11 +25,15 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.workspace.keyboardlayout 1.0
PlasmaComponents.ToolButton {
property int fontSize: config.fontSize
id: kbLayoutButton
iconName: "input-keyboard"
implicitWidth: minimumWidth
text: layout.currentLayoutDisplayName
font.pointSize: Math.max(fontSize,theme.defaultFont.pointSize)
Accessible.name: i18ndc("plasma_lookandfeel_org.kde.lookandfeel", "Button to change keyboard layout", "Switch layout")
......
......@@ -61,6 +61,8 @@ Item {
property alias userList: userListView
property int fontSize: config.fontSize
default property alias _children: innerLayout.children
UserList {
......@@ -85,6 +87,7 @@ Item {
anchors.bottom: parent.bottom
PlasmaComponents.Label {
id: notificationsLabel
font.pointSize: Math.max(fontSize + 1,theme.defaultFont.pointSize + 1)
Layout.maximumWidth: units.gridUnit * 16
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
......
......@@ -37,6 +37,8 @@ Item {
property string avatarPath
property string iconSource
property bool constrainText: true
property alias nameFontSize: usernameDelegate.font.pointSize
property int fontSize: config.fontSize
signal clicked()
property real faceSize: Math.min(width, height - usernameDelegate.height - units.smallSpacing)
......@@ -159,7 +161,7 @@ Item {
PlasmaComponents.Label {
id: usernameDelegate
font.pointSize: theme.defaultFont.pointSize + 2
font.pointSize: Math.max(fontSize + 2,theme.defaultFont.pointSize + 2)
anchors {
bottom: parent.bottom
horizontalCenter: parent.horizontalCenter
......
......@@ -417,6 +417,7 @@ PlasmaCore.ColorScope {
PlasmaComponents.Button {
Layout.fillWidth: true
font.pointSize: theme.defaultFont.pointSize + 1
// the magic "-1" vtNumber indicates the "New Session" entry
text: userListCurrentModelData.vtNumber === -1 ? i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Start New Session") : i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Switch Session")
onClicked: initSwitchSession()
......
......@@ -114,11 +114,12 @@ Item {
PlasmaExtras.Heading {
Layout.fillWidth: true
level: 4
level: 5
wrapMode: Text.NoWrap
elide: Text.ElideRight
text: mpris2Source.track || i18n("No media playing")
textFormat: Text.PlainText
font.weight: Font.Bold
}
PlasmaExtras.Heading {
......@@ -129,6 +130,7 @@ Item {
// if no artist is given, show player name instead
text: mpris2Source.artist || mpris2Source.identity || ""
textFormat: Text.PlainText
opacity: 0.75
}
}
......
......@@ -119,6 +119,7 @@ PlasmaCore.ColorScope {
UserDelegate {
width: units.iconSizes.enormous
height: width
nameFontSize: theme.defaultFont.pointSize + 2
anchors {
horizontalCenter: parent.horizontalCenter
bottom: parent.verticalCenter
......
......@@ -35,6 +35,7 @@ ActionButton {
opacity: activeFocus || containsMouse ? 1 : 0.5
labelRendering: Text.QtRendering // Remove once we've solved Qt bug: https://bugreports.qt.io/browse/QTBUG-70138 (KDE bug: https://bugs.kde.org/show_bug.cgi?id=401644)
font.underline: false
font.pointSize: theme.defaultFont.pointSize + 1
Behavior on opacity {
OpacityAnimator {
duration: units.longDuration
......
......@@ -12,6 +12,7 @@ PlasmaComponents.ToolButton {
text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Keyboard Layout: %1", instantiator.objectAt(currentIndex).shortName)
implicitWidth: minimumWidth
font.pointSize: config.fontSize
visible: menu.items.length > 1
......
......@@ -19,6 +19,8 @@ SessionManagementScreen {
property int visibleBoundary: mapFromItem(loginButton, 0, 0).y
onHeightChanged: visibleBoundary = mapFromItem(loginButton, 0, 0).y + loginButton.height + units.smallSpacing
property int fontSize: config.fontSize
signal loginRequest(string username, string password)
onShowUsernamePromptChanged: {
......@@ -44,7 +46,7 @@ SessionManagementScreen {
PlasmaComponents.TextField {
id: userNameInput
font.pointSize: theme.defaultFont.pointSize + 1
font.pointSize: fontSize + 1
Layout.fillWidth: true
text: lastUserName
......@@ -63,7 +65,7 @@ SessionManagementScreen {
PlasmaComponents.TextField {
id: passwordBox
font.pointSize: theme.defaultFont.pointSize + 1
font.pointSize: fontSize + 1
Layout.fillWidth: true
placeholderText: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Password")
......
......@@ -34,6 +34,8 @@ PlasmaComponents.ToolButton {
text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Desktop Session: %1", instantiator.objectAt(currentIndex).text || "")
font.pointSize: config.fontSize
Component.onCompleted: {
currentIndex = sessionModel.lastIndex
}
......
[General]
type=image
color=#1d99f3
fontSize=10
background=${CMAKE_INSTALL_PREFIX}/${WALLPAPER_INSTALL_DIR}/Next/contents/images/3200x2000.png
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