summary refs log tree commit diff
path: root/src/SuggestionsPopup.cpp
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-07-15 21:26:48 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-07-15 21:26:48 +0300
commit21185a44e723d016246af1b03a24ac787790106e (patch)
tree18ea3992c7d0266f52cb6b7980599a4a1b30651c /src/SuggestionsPopup.cpp
parentUse MainWindow instead of QApplication::activeWindow to reference the main wi... (diff)
downloadnheko-21185a44e723d016246af1b03a24ac787790106e.tar.xz
Properly reset the autocomplete anchor when the popup closes
fixes #305
Diffstat (limited to 'src/SuggestionsPopup.cpp')
-rw-r--r--src/SuggestionsPopup.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/SuggestionsPopup.cpp b/src/SuggestionsPopup.cpp

index 82b7938b..bcfcb233 100644 --- a/src/SuggestionsPopup.cpp +++ b/src/SuggestionsPopup.cpp
@@ -9,8 +9,8 @@ #include <QPainter> #include <QStyleOption> -constexpr int PopupHMargin = 5; -constexpr int PopupItemMargin = 4; +constexpr int PopupHMargin = 4; +constexpr int PopupItemMargin = 3; PopupItem::PopupItem(QWidget *parent) : QWidget(parent) @@ -23,6 +23,8 @@ PopupItem::PopupItem(QWidget *parent) topLayout_ = new QHBoxLayout(this); topLayout_->setContentsMargins( PopupHMargin, PopupItemMargin, PopupHMargin, PopupItemMargin); + + setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); } void