Skip to content

Commit

Permalink
fix(editor): adjust resize logic for EditorFragment
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Feb 11, 2025
1 parent 255870a commit e4e82e3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ class EditorFragment(var editor: EditorEx, private val editorLineThreshold: Int
}

fun resizeForNewThreshold(newThreshold: Int) {
content.preferredSize = calculatePreferredSize(content.preferredSize, newThreshold)
setCollapsed(false)

setCollapsed(true)
content.preferredSize = calculatePreferredSize(content.preferredSize, newThreshold)

val linesCount = editor.document.lineCount
expandCollapseTextLabel.isVisible = linesCount > editorLineThreshold
Expand Down

0 comments on commit e4e82e3

Please sign in to comment.