|
|
@ -22,6 +22,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
OverlayModal::OverlayModal(QWidget *parent, QWidget *content) |
|
|
|
OverlayModal::OverlayModal(QWidget *parent, QWidget *content) |
|
|
|
: OverlayWidget(parent) |
|
|
|
: OverlayWidget(parent) |
|
|
|
|
|
|
|
, content_{content} |
|
|
|
, duration_{500} |
|
|
|
, duration_{500} |
|
|
|
, color_{QColor(55, 55, 55)} |
|
|
|
, color_{QColor(55, 55, 55)} |
|
|
|
{ |
|
|
|
{ |
|
|
@ -60,6 +61,13 @@ OverlayModal::paintEvent(QPaintEvent *event) |
|
|
|
painter.fillRect(rect(), color_); |
|
|
|
painter.fillRect(rect(), color_); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void |
|
|
|
|
|
|
|
OverlayModal::mousePressEvent(QMouseEvent *e) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (content_ && !content_->geometry().contains(e->pos())) |
|
|
|
|
|
|
|
fadeOut(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void |
|
|
|
void |
|
|
|
OverlayModal::fadeIn() |
|
|
|
OverlayModal::fadeIn() |
|
|
|
{ |
|
|
|
{ |
|
|
|