Commit f4afa71e authored by WINTZ Julien's avatar WINTZ Julien

Cleanup up all remains of custom fixed painting.

Will introduce qless operators now.
parent 5c34b954
......@@ -15,6 +15,7 @@
#include <QtCore>
#include <QtWidgets>
#include <dtkThemes>
#include <dtkWidgets>
// ///////////////////////////////////////////////////////////////////
......@@ -113,12 +114,16 @@ int main(int argc, char **argv)
{
QApplication application(argc, argv);
dtkThemesEngine::instance()->apply("NordLight");
dummy *window = new dummy;
window->resize(1024, 600);
window->show();
window->raise();
window->setStyleSheet(dtkReadFile(":main.qss"));
dtkThemesEngine::instance()->apply("NordLight");
return application.exec();
}
......
......@@ -106,7 +106,7 @@ dtkWidgetsOverlayPaneItemHeader
dummy
{
background: "#aaaaff";
background: "#aaaa00";
}
/* main.qss ends here */
......@@ -118,14 +118,6 @@ protected:
void mousePressEvent(QMouseEvent *event) override;
void mouseMoveEvent(QMouseEvent *event) override;
protected:
void paintEvent(QPaintEvent *event) override
{
qDebug() << Q_FUNC_INFO;
QPainter painter(this);
painter.fillRect(event->rect(), Qt::blue);
}
protected:
class dtkWidgetsMenuBarPrivate *d = nullptr;
......
......@@ -59,14 +59,6 @@ public:
void touch(dtkWidgetsMenuBar *);
void buildChildSlide(dtkWidgetsMenu *);
protected:
void paintEvent(QPaintEvent *event) override
{
qDebug() << Q_FUNC_INFO;
QPainter painter(this);
painter.fillRect(event->rect(), QColor(128, 128, 0, 56));
}
public:
dtkWidgetsMenuBar *q = nullptr;
......@@ -103,14 +95,6 @@ public:
void touch(dtkWidgetsMenuBar *, dtkWidgetsMenuBarContainer *);
void touch(dtkWidgetsMenu *, dtkWidgetsMenuBarContainer *);
protected:
void paintEvent(QPaintEvent *event) override
{
qDebug() << Q_FUNC_INFO;
QPainter painter(this);
painter.fillRect(event->rect(), QColor(128, 0, 0, 56));
}
private:
dtkWidgetsMenu *menu = nullptr;
dtkWidgetsMenuBar *menu_bar = nullptr;
......
......@@ -151,14 +151,6 @@ void dtkWidgetsOverlayPane::leaveEvent(QEvent *)
emit left();
}
void dtkWidgetsOverlayPane::paintEvent(QPaintEvent *event)
{
qDebug() << Q_FUNC_INFO;
QPainter painter(this);
painter.fillRect(event->rect(), Qt::transparent);
}
void dtkWidgetsOverlayPane::addLayout(QLayout *layout)
{
d->layout->addLayout(layout);
......
......@@ -60,7 +60,6 @@ public slots:
protected:
void enterEvent(QEvent *);
void leaveEvent(QEvent *);
void paintEvent(QPaintEvent *);
private:
class dtkWidgetsOverlayPanePrivate *d;
......
......@@ -153,6 +153,9 @@ dtkWidgetsOverlayPaneItemFooter::dtkWidgetsOverlayPaneItemFooter(QWidget *parent
layout->addWidget(this->box);
this->setVisible(false);
this->setAttribute(Qt::WA_NoSystemBackground);
this->setAttribute(Qt::WA_TranslucentBackground);
}
dtkWidgetsOverlayPaneItemFooter::~dtkWidgetsOverlayPaneItemFooter(void)
......@@ -203,6 +206,9 @@ dtkWidgetsOverlayPaneItem::dtkWidgetsOverlayPaneItem(QWidget *parent) : QFrame(p
layout->addWidget(d->footer);
connect(d->header, SIGNAL(toggled(bool)), d->footer, SLOT(setVisible(bool)));
this->setAttribute(Qt::WA_NoSystemBackground);
this->setAttribute(Qt::WA_TranslucentBackground);
}
dtkWidgetsOverlayPaneItem::~dtkWidgetsOverlayPaneItem(void)
......
......@@ -54,10 +54,10 @@ public:
public:
void setCurrentIndex(int);
void setCurrentIndex(int, std::function<void ()>&);
public:
void enableSpying(bool);
private:
class dtkWidgetsOverlayPaneSliderPrivate *d;
};
......
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