mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-26 13:08:48 +03:00
Fix a small alignment issue of text in notification bubbles
This commit is contained in:
parent
2ffd476e8f
commit
999ac95658
1 changed files with 4 additions and 4 deletions
|
@ -236,7 +236,7 @@ Page {
|
||||||
enabled: false
|
enabled: false
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
height: fontMetrics.averageCharacterWidth * 3
|
height: fontMetrics.averageCharacterWidth * 3
|
||||||
width: Math.min(Math.max(collapsedBubbleText.width + Nheko.paddingMedium, height), parent.width)
|
width: Math.max(collapsedBubbleText.width, height)
|
||||||
radius: height / 2
|
radius: height / 2
|
||||||
color: hasLoudNotification ? Nheko.theme.red : roomItem.bubbleBackground
|
color: hasLoudNotification ? Nheko.theme.red : roomItem.bubbleBackground
|
||||||
|
|
||||||
|
@ -246,7 +246,7 @@ Page {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
fontSizeMode: Text.Fit
|
width: Math.max(implicitWidth + Nheko.paddingMedium, parent.height)
|
||||||
font.bold: true
|
font.bold: true
|
||||||
font.pixelSize: fontMetrics.font.pixelSize * 0.8
|
font.pixelSize: fontMetrics.font.pixelSize * 0.8
|
||||||
color: hasLoudNotification ? "white" : roomItem.bubbleText
|
color: hasLoudNotification ? "white" : roomItem.bubbleText
|
||||||
|
@ -321,7 +321,7 @@ Page {
|
||||||
visible: notificationCount > 0
|
visible: notificationCount > 0
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
height: notificationBubbleText.height + Nheko.paddingMedium
|
height: notificationBubbleText.height + Nheko.paddingMedium
|
||||||
Layout.preferredWidth: Math.max(notificationBubbleText.width + Nheko.paddingMedium, height)
|
Layout.preferredWidth: Math.max(notificationBubbleText.width, height)
|
||||||
radius: height / 2
|
radius: height / 2
|
||||||
color: hasLoudNotification ? Nheko.theme.red : roomItem.bubbleBackground
|
color: hasLoudNotification ? Nheko.theme.red : roomItem.bubbleBackground
|
||||||
ToolTip.text: notificationCount
|
ToolTip.text: notificationCount
|
||||||
|
@ -333,7 +333,7 @@ Page {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
fontSizeMode: Text.Fit
|
width: Math.max(implicitWidth + Nheko.paddingMedium, parent.height)
|
||||||
font.bold: true
|
font.bold: true
|
||||||
font.pixelSize: fontMetrics.font.pixelSize * 0.8
|
font.pixelSize: fontMetrics.font.pixelSize * 0.8
|
||||||
color: hasLoudNotification ? "white" : roomItem.bubbleText
|
color: hasLoudNotification ? "white" : roomItem.bubbleText
|
||||||
|
|
Loading…
Reference in a new issue