ChatBox: Fix jittery ChatBar
ChatBar animated its implicit height, and there is no way for us to force it animating on integer values only. It is contained in a Layout type, and QtQuick.Layouts are known to round up size of their items and position them on an integer scale. All in all, is caused bottom of chat bar (action icons row and the whole bottom edge) to flicker during height animation.
This commit is contained in:
@@ -65,9 +65,10 @@ ColumnLayout {
|
||||
visible: root.currentRoom.canSendEvent("m.room.message")
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumHeight: Math.max(Kirigami.Units.gridUnit * 2, implicitHeight + Kirigami.Units.largeSpacing)
|
||||
Layout.minimumHeight: Math.max(Kirigami.Units.gridUnit * 2, Math.round(implicitHeight) + Kirigami.Units.largeSpacing)
|
||||
// lineSpacing is height+leading, so subtract leading once since leading only exists between lines.
|
||||
Layout.maximumHeight: chatBarFontMetrics.lineSpacing * 8 - chatBarFontMetrics.leading + textField.topPadding + textField.bottomPadding
|
||||
Layout.preferredHeight: Math.round(implicitHeight)
|
||||
|
||||
currentRoom: root.currentRoom
|
||||
|
||||
|
||||
Reference in New Issue
Block a user