Commit 7300b0f8 authored by WINTZ Julien's avatar WINTZ Julien

Minimalistic handling of composition.

parent f4afa71e
......@@ -14,11 +14,9 @@
#include "dtkWidgetsOverlayPane.h"
// ///////////////////////////////////////////////////////////////////
// TODO: Use dtkThemeEngine instead
// ///////////////////////////////////////////////////////////////////
#include <dtkThemes>
static const QString altbg_color = "#88111111";
// ///////////////////////////////////////////////////////////////////
static const int duration = 250;
......@@ -151,6 +149,23 @@ void dtkWidgetsOverlayPane::leaveEvent(QEvent *)
emit left();
}
void dtkWidgetsOverlayPane::paintEvent(QPaintEvent *event)
{
QFrame::paintEvent(event);
QPainter painter(this);
QColor color = dtkThemesEngine::instance()->color("@bg");
color.setAlpha(178);
painter.fillRect(event->rect(), color);
color = dtkThemesEngine::instance()->color("@base2");
painter.setPen(color);
painter.drawLine(event->rect().topRight(), event->rect().bottomRight());
}
void dtkWidgetsOverlayPane::addLayout(QLayout *layout)
{
d->layout->addLayout(layout);
......
......@@ -60,6 +60,7 @@ public slots:
protected:
void enterEvent(QEvent *);
void leaveEvent(QEvent *);
void paintEvent(QPaintEvent *);
private:
class dtkWidgetsOverlayPanePrivate *d;
......
......@@ -153,9 +153,6 @@ dtkWidgetsOverlayPaneItemFooter::dtkWidgetsOverlayPaneItemFooter(QWidget *parent
layout->addWidget(this->box);
this->setVisible(false);
this->setAttribute(Qt::WA_NoSystemBackground);
this->setAttribute(Qt::WA_TranslucentBackground);
}
dtkWidgetsOverlayPaneItemFooter::~dtkWidgetsOverlayPaneItemFooter(void)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment