Add transparent overlay window (#4746)
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
#pragma once
|
||||
|
||||
#include "widgets/helper/TitlebarButton.hpp"
|
||||
|
||||
#include <QPropertyAnimation>
|
||||
#include <QWidget>
|
||||
|
||||
class QGridLayout;
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
class OverlayWindow;
|
||||
class OverlayInteraction : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
OverlayInteraction(OverlayWindow *parent);
|
||||
|
||||
void attach(QGridLayout *layout);
|
||||
|
||||
QWidget *closeButton();
|
||||
|
||||
void startInteraction();
|
||||
void endInteraction();
|
||||
|
||||
bool isInteracting() const;
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
|
||||
private:
|
||||
Q_PROPERTY(double interactionProgress READ interactionProgress WRITE
|
||||
setInteractionProgress)
|
||||
|
||||
TitleBarButton closeButton_;
|
||||
|
||||
double interactionProgress() const;
|
||||
void setInteractionProgress(double progress);
|
||||
|
||||
bool interacting_ = false;
|
||||
double interactionProgress_ = 0.0;
|
||||
QPropertyAnimation interactAnimation_;
|
||||
|
||||
OverlayWindow *window_;
|
||||
};
|
||||
|
||||
} // namespace chatterino
|
||||
Reference in New Issue
Block a user