diff options
author | Joseph Donofry <rubberduckie3554@gmail.com> | 2019-03-03 18:35:45 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-03 18:35:45 -0500 |
commit | e3ca96000aa6997ef577705d38032a187adbac9f (patch) | |
tree | 9dcd0f39fd737e81212836ca693ab28367548e05 /src | |
parent | Update README screenshots. Fixes #36 (diff) | |
parent | Don't let multiline text background overlap top border of text widget (diff) | |
download | nheko-e3ca96000aa6997ef577705d38032a187adbac9f.tar.xz |
Merge pull request #40 from vtronko/textwidgetborder-fix
Don't let multiline text background overlap top border of text widget. Fixes #39 Thanks @vtronko
Diffstat (limited to 'src')
-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); |