Skip to content

Commit

Permalink
Translator: Adjust the size of the text edit box
Browse files Browse the repository at this point in the history
  • Loading branch information
Wohlstand committed Feb 25, 2024
1 parent 7163c63 commit 00906ca
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Translator/common_features/growing_text_edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,10 @@ void GrowingTextEdit::sizeChanged(const QSizeF &newSize)
int docHeight = newSize.toSize().height();

if(m_heightMin < docHeight && docHeight < m_heightMax)
setMinimumHeight((docHeight * m.height()) + 10);
{
int newH = ((docHeight + 1) * m.height()) + 10;
setMinimumHeight(newH);
resize(size().width(), newH);
updateGeometry();
}
}

0 comments on commit 00906ca

Please sign in to comment.