Commit 904368da authored by Luis Javier Merino's avatar Luis Javier Merino Committed by Harald Sitter
Browse files

[kcms/keyboard] tastenbrett: left-align key labels

When the horizontal alignment of a label is not specified, the default
is to follow the natural alignment of the text, e.g. RTL text is aligned
to the right, and LTR text is aligned to the left.

This causes key caps with labels with different directionality to look
quite messed up.
parent 3296b46d
......@@ -31,6 +31,7 @@ Item {
KeyCapLabel {
id: topLeft
width: topRight.text == "" ? parent.width : parent.width / 2.0
horizontalAlignment: Text.AlignLeft
height: (bottomLeft.text == "" && bottomRight.text == "") ? parent.height / 1.7 : parent.height /2.0
anchors.top: parent.top
anchors.left: parent.left
......@@ -39,6 +40,7 @@ Item {
KeyCapLabel {
id: topRight
width: parent.width /2.0
horizontalAlignment: Text.AlignLeft
height: parent.height /2.0
anchors.top: parent.top
anchors.right: parent.right
......@@ -47,6 +49,7 @@ Item {
KeyCapLabel {
id: bottomLeft
width: bottomRight.text == "" ? parent.width : parent.width / 2.0
horizontalAlignment: Text.AlignLeft
height: (topLeft.text == "" && topRight.text == "") ? parent.height / 1.7 : parent.height /2.0
anchors.bottom: parent.bottom
anchors.left: parent.left
......@@ -55,6 +58,7 @@ Item {
KeyCapLabel {
id: bottomRight
width: parent.width /2.0
horizontalAlignment: Text.AlignLeft
height: parent.height /2.0
anchors.bottom: parent.bottom
anchors.right: parent.right
......
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