mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
LocationCompleterView: Always resize on first adjustSize after show
This commit is contained in:
parent
3ec4d96f74
commit
3469d5b114
|
@ -136,17 +136,20 @@ void LocationCompleterView::adjustSize()
|
|||
});
|
||||
}
|
||||
|
||||
if (newHeight == m_view->height() || newHeight == m_resizeHeight) {
|
||||
return;
|
||||
}
|
||||
if (!m_forceResize) {
|
||||
if (newHeight == m_view->height() || newHeight == m_resizeHeight) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (newHeight < m_view->height()) {
|
||||
m_resizeHeight = newHeight;
|
||||
m_resizeTimer->start();
|
||||
return;
|
||||
if (newHeight < m_view->height()) {
|
||||
m_resizeHeight = newHeight;
|
||||
m_resizeTimer->start();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
m_resizeHeight = -1;
|
||||
m_forceResize = false;
|
||||
m_view->setFixedHeight(newHeight);
|
||||
setFixedHeight(sizeHint().height());
|
||||
}
|
||||
|
@ -370,8 +373,8 @@ void LocationCompleterView::close()
|
|||
{
|
||||
hide();
|
||||
m_view->verticalScrollBar()->setValue(0);
|
||||
|
||||
m_delegate->setShowSwitchToTab(true);
|
||||
m_forceResize = true;
|
||||
|
||||
emit closed();
|
||||
}
|
||||
|
|
|
@ -71,6 +71,7 @@ private:
|
|||
QString m_originalText;
|
||||
int m_resizeHeight = -1;
|
||||
QTimer *m_resizeTimer = nullptr;
|
||||
bool m_forceResize = true;
|
||||
};
|
||||
|
||||
#endif // LOCATIONCOMPLETERVIEW_H
|
||||
|
|
Loading…
Reference in New Issue
Block a user