Implemented a new, better looking tooltip. (#158)

* Implemented a new, better looking tooltip.

* Pajlada fix.

* Fixed dragging behaving incorrectly.

* Fixed out of focus hovering getting stuck.
This commit is contained in:
Cranken
2017-12-23 22:17:38 +01:00
committed by pajlada
parent fc81b118c7
commit a617873f6a
11 changed files with 172 additions and 37 deletions
+34
View File
@@ -0,0 +1,34 @@
#pragma once
#include "widgets/basewidget.hpp"
#include <QWidget>
#include <QLabel>
namespace chatterino {
namespace widgets {
class TooltipWidget : public BaseWidget
{
Q_OBJECT
public:
TooltipWidget(BaseWidget *parent = nullptr);
void setText(QString text);
void moveTo(QPoint point);
static TooltipWidget* getInstance()
{
static TooltipWidget *tooltipWidget = nullptr;
if(tooltipWidget == nullptr)
{
tooltipWidget = new TooltipWidget();
}
return tooltipWidget;
}
private:
QLabel *displayText;
};
} // namespace widgets
} // namespace chatterino