Commit 5b9d4fd0 authored by Andrey Butirsky's avatar Andrey Butirsky Committed by Nate Graham
Browse files

fix: Wrong fontsize on Keyboard Layout applet

We do "fontSizeMode: Text.Fit" so font could scale along with the item

BUG: 431889


(cherry picked from commit f7bb44d0)
parent 41de7160
......@@ -9,6 +9,7 @@ import Qt.labs.platform 1.1
import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.workspace.components 2.0
import org.kde.plasma.components 3.0 as PlasmaComponents3
KeyboardLayoutButton {
id: root
......@@ -52,6 +53,23 @@ KeyboardLayoutButton {
keyboardLayout.layout = selectedLayout
}
contentItem: Item {
PlasmaCore.IconItem {
source: icon.name
visible: display === AbstractButton.IconOnly
anchors.fill: parent
}
PlasmaComponents3.Label {
text: root.text
visible: display === AbstractButton.TextOnly
anchors.fill: parent
horizontalAlignment: Text.AlignHCenter
fontSizeMode: Text.Fit
font.pointSize: height
}
}
// to fit at least 2 letters in systray
leftPadding: 0
rightPadding: 0
......
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