diff --git a/src/irc/channel.cpp b/src/irc/channel.cpp --- a/src/irc/channel.cpp +++ b/src/irc/channel.cpp @@ -239,6 +239,7 @@ cipherLabel->hide(); cipherLabel->setPixmap(KIconLoader::global()->loadIcon(QStringLiteral("document-encrypt"), KIconLoader::Toolbar)); m_inputBar = new IRCInput(commandLineBox); + m_inputBar->setReferenceHeight(nicknameCombobox->height()); commandLineLayout->addWidget(nicknameCombobox); commandLineLayout->addWidget(awayLabel); diff --git a/src/viewer/ircinput.h b/src/viewer/ircinput.h --- a/src/viewer/ircinput.h +++ b/src/viewer/ircinput.h @@ -36,6 +36,7 @@ QSize sizeHint() const Q_DECL_OVERRIDE; QSize minimumSizeHint() const Q_DECL_OVERRIDE; + void setReferenceHeight(int h); bool event(QEvent* e) Q_DECL_OVERRIDE; @@ -84,6 +85,7 @@ QString m_lastCompletion; bool m_multiRow; int m_qtBoxPadding; //see comment in constructor + int m_referenceHeight = 0; QTimer* m_disableSpellCheckTimer; diff --git a/src/viewer/ircinput.cpp b/src/viewer/ircinput.cpp --- a/src/viewer/ircinput.cpp +++ b/src/viewer/ircinput.cpp @@ -96,7 +96,12 @@ QSize IRCInput::minimumSizeHint() const { - return sizeHint(); + return QSize(100, m_referenceHeight + 2 * frameWidth()); +} + +void IRCInput::setReferenceHeight(int h) +{ + m_referenceHeight = h; } void IRCInput::maybeResize() diff --git a/src/viewer/statuspanel.cpp b/src/viewer/statuspanel.cpp --- a/src/viewer/statuspanel.cpp +++ b/src/viewer/statuspanel.cpp @@ -57,6 +57,7 @@ awayLabel->hide(); m_inputBar=new IRCInput(commandLineBox); + m_inputBar->setReferenceHeight(nicknameCombobox->height()); commandLineBoxLayout->addWidget(m_inputBar); getTextView()->installEventFilter(m_inputBar);