mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Fixed tooltip now closing properly. Fixes #159
This commit is contained in:
parent
91099c028e
commit
0ca4a098e1
4 changed files with 10 additions and 21 deletions
|
@ -104,7 +104,14 @@ bool BaseWidget::nativeEvent(const QByteArray &eventType, void *message, long *r
|
|||
}
|
||||
#endif
|
||||
|
||||
void BaseWidget::focusOutEvent(QFocusEvent *)
|
||||
void BaseWidget::changeEvent(QEvent *)
|
||||
{
|
||||
if (this->isWindow) {
|
||||
TooltipWidget::getInstance()->hide();
|
||||
}
|
||||
}
|
||||
|
||||
void BaseWidget::leaveEvent(QEvent *)
|
||||
{
|
||||
if (this->isWindow) {
|
||||
TooltipWidget::getInstance()->hide();
|
||||
|
|
|
@ -28,7 +28,8 @@ protected:
|
|||
virtual bool nativeEvent(const QByteArray &eventType, void *message, long *result) override;
|
||||
#endif
|
||||
|
||||
virtual void focusOutEvent(QFocusEvent *) override;
|
||||
virtual void changeEvent(QEvent *) override;
|
||||
virtual void leaveEvent(QEvent *) override;
|
||||
|
||||
// XXX: Should this be pure virtual?
|
||||
// fourtf: hell no
|
||||
|
|
|
@ -107,20 +107,6 @@ void Window::closeEvent(QCloseEvent *)
|
|||
this->closed();
|
||||
}
|
||||
|
||||
// void Window::changeEvent(QEvent *event)
|
||||
//{
|
||||
// if (!this->isActiveWindow()) {
|
||||
// this->lostFocus.invoke();
|
||||
// }
|
||||
// BaseWidget::changeEvent(event);
|
||||
//}
|
||||
|
||||
// void Window::leaveEvent(QEvent *event)
|
||||
//{
|
||||
// this->lostFocus.invoke();
|
||||
// BaseWidget::leaveEvent(event);
|
||||
//}
|
||||
|
||||
void Window::refreshTheme()
|
||||
{
|
||||
QPalette palette;
|
||||
|
|
|
@ -56,14 +56,9 @@ public:
|
|||
|
||||
boost::signals2::signal<void()> closed;
|
||||
|
||||
// pajlada::Signals::NoArgSignal lostFocus;
|
||||
|
||||
protected:
|
||||
virtual void closeEvent(QCloseEvent *event) override;
|
||||
|
||||
// virtual void changeEvent(QEvent *event) override;
|
||||
// virtual void leaveEvent(QEvent *event) override;
|
||||
|
||||
private:
|
||||
float dpi;
|
||||
|
||||
|
|
Loading…
Reference in a new issue