Skip to content

Commit

Permalink
topicField: use topicText.implicitHeight to calculate the height
Browse files Browse the repository at this point in the history
Another attempt at fixing #916.
  • Loading branch information
KitsuneRal committed Dec 31, 2024
1 parent e102faa commit 7c14525
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions client/qml/Timeline.qml
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,10 @@ Page {
id: topicField
visible: roomHeader.showTopic
width: parent.width
// Allow 6 lines of the topic but not more than 20% of the
// timeline vertical space; if there are more than 6 lines
// reveal the top of the 7th line as a hint
height: Math.min(
topicText.contentHeight,
root.height / 5,
settings.lineSpacing * 6.6)
+ topicText.topPadding + topicText.bottomPadding
clip: true
// Allow 5 full (actually, 6 minus padding) lines of the topic
// but not more than 20% of the timeline vertical space
height:
Math.min(topicText.implicitHeight, root.height / 5, settings.lineSpacing * 6)

ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
ScrollBar.vertical.policy: ScrollBar.AsNeeded
Expand Down

0 comments on commit 7c14525

Please sign in to comment.