mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Close UserInfoPopup when Escape is pressed
This commit is contained in:
parent
dad9677bba
commit
666b577bd5
1 changed files with 4 additions and 0 deletions
|
@ -12,6 +12,7 @@
|
||||||
#include "singletons/Settings.hpp"
|
#include "singletons/Settings.hpp"
|
||||||
#include "util/LayoutCreator.hpp"
|
#include "util/LayoutCreator.hpp"
|
||||||
#include "util/PostToThread.hpp"
|
#include "util/PostToThread.hpp"
|
||||||
|
#include "util/Shortcut.hpp"
|
||||||
#include "widgets/Label.hpp"
|
#include "widgets/Label.hpp"
|
||||||
#include "widgets/helper/EffectLabel.hpp"
|
#include "widgets/helper/EffectLabel.hpp"
|
||||||
#include "widgets/helper/Line.hpp"
|
#include "widgets/helper/Line.hpp"
|
||||||
|
@ -60,6 +61,9 @@ UserInfoPopup::UserInfoPopup()
|
||||||
this->setWindowFlag(Qt::Popup);
|
this->setWindowFlag(Qt::Popup);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Close the popup when Escape is pressed
|
||||||
|
createWindowShortcut(this, "Escape", [this] { this->deleteLater(); });
|
||||||
|
|
||||||
auto layout = LayoutCreator<QWidget>(this->getLayoutContainer())
|
auto layout = LayoutCreator<QWidget>(this->getLayoutContainer())
|
||||||
.setLayoutType<QVBoxLayout>();
|
.setLayoutType<QVBoxLayout>();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue