Skip to content

Commit

Permalink
Fix display of right-to-left text in timeline
Browse files Browse the repository at this point in the history
Set an explicit default left alignment for label components, to prevent
other people's right-to-left names or text from messing up the UI
in a left-to-right environment.
  • Loading branch information
mirukana committed Mar 3, 2021
1 parent dbd7858 commit 53d2ab1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/gui/Base/HLabel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ Label {
font.pixelSize: theme.fontSize.normal
font.pointSize: -1
textFormat: Label.PlainText

horizontalAlignment: Label.AlignLeft
color: theme.colors.text
linkColor: theme.colors.link

maximumLineCount: elide === Label.ElideNone ? Number.MAX_VALUE : 1

onLinkActivated: Qt.openUrlExternally(link)
Expand Down
3 changes: 2 additions & 1 deletion src/gui/Base/HSelectableLabel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@ TextEdit {
font.family: theme.fontFamily.sans
font.pixelSize: theme.fontSize.normal
color: theme.colors.text

textFormat: Label.PlainText
tabStopDistance: 4 * 4 // 4 spaces
horizontalAlignment: Label.AlignLeft

readOnly: true
activeFocusOnPress: false
focus: false
selectByMouse: true

onLinkActivated: if (enableLinkActivation) Qt.openUrlExternally(link)

MouseArea {
Expand Down

0 comments on commit 53d2ab1

Please sign in to comment.