fix: stop click when dragging over notebook buttons (#6266)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -13,22 +13,17 @@ class NotebookButton : public Button
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum Icon {
|
||||
None,
|
||||
enum class Type : std::uint8_t {
|
||||
Plus,
|
||||
};
|
||||
|
||||
explicit NotebookButton(Notebook *parent);
|
||||
|
||||
void setIcon(Icon icon);
|
||||
Icon getIcon() const;
|
||||
NotebookButton(Type type_, Notebook *parent);
|
||||
|
||||
protected:
|
||||
void paintContent(QPainter &painter) override;
|
||||
|
||||
void themeChangedEvent() override;
|
||||
void dragEnterEvent(QDragEnterEvent *) override;
|
||||
void dragLeaveEvent(QDragLeaveEvent *) override;
|
||||
void dropEvent(QDropEvent *) override;
|
||||
|
||||
void hideEvent(QHideEvent *) override;
|
||||
@@ -37,7 +32,7 @@ protected:
|
||||
private:
|
||||
Notebook *parent_ = nullptr;
|
||||
QPoint mousePos_;
|
||||
Icon icon_ = None;
|
||||
Type type = Type::Plus;
|
||||
};
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
Reference in New Issue
Block a user