diff options
author | Vladyslav tronko <git@vtronko.me> | 2019-03-03 17:41:46 +0200 |
---|---|---|
committer | Vladyslav Tronko <git@vtronko.me> | 2019-03-04 00:54:53 +0200 |
commit | c719e01f3d1d35a1c7024b0d5f18521dcc545b18 (patch) | |
tree | 9dcd0f39fd737e81212836ca693ab28367548e05 /src/TextInputWidget.cpp | |
parent | Update README screenshots. Fixes #36 (diff) | |
download | nheko-c719e01f3d1d35a1c7024b0d5f18521dcc545b18.tar.xz |
Don't let multiline text background overlap top border of text widget
Diffstat (limited to 'src/TextInputWidget.cpp')
-rw-r--r-- | src/TextInputWidget.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/TextInputWidget.cpp b/src/TextInputWidget.cpp index 5fcba7a9..14d0e67d 100644 --- a/src/TextInputWidget.cpp +++ b/src/TextInputWidget.cpp @@ -456,7 +456,7 @@ TextInputWidget::TextInputWidget(QWidget *parent) topLayout_ = new QHBoxLayout(); topLayout_->setSpacing(0); - topLayout_->setContentsMargins(13, 0, 13, 0); + topLayout_->setContentsMargins(13, 1, 13, 0); QIcon send_file_icon; send_file_icon.addFile(":/icons/icons/ui/paper-clip-outline.png"); @@ -481,10 +481,10 @@ TextInputWidget::TextInputWidget(QWidget *parent) &FilteredTextEdit::heightChanged, this, [this, InputHeight, contentHeight](int height) { - int textInputHeight = - std::min(MAX_TEXTINPUT_HEIGHT, std::max(height, InputHeight)); int widgetHeight = std::min(MAX_TEXTINPUT_HEIGHT, std::max(height, contentHeight)); + int textInputHeight = + std::min(widgetHeight - 1, std::max(height, InputHeight)); setFixedHeight(widgetHeight); input_->setFixedHeight(textInputHeight); |