Commit 5c34b954 authored by WINTZ Julien's avatar WINTZ Julien

Housekeepin'

parent 893ff139
......@@ -236,11 +236,5 @@ install(TARGETS ${PROJECT_NAME}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT widgets)
## ###################################################################
## Language server protocol
## ###################################################################
add_custom_command(TARGET ${PROJECT_NAME} PRE_BUILD COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_BINARY_DIR}/compile_commands.json ${CMAKE_SOURCE_DIR}/compile_commands.json)
######################################################################
### CMakeLists.txt ends here
......@@ -230,6 +230,9 @@ dtkWidgetsMenuBarContainerSlide::dtkWidgetsMenuBarContainerSlide(dtkWidgetsMenu
layout->setAlignment(Qt::AlignTop);
this->touch(m, c);
this->setAttribute(Qt::WA_NoSystemBackground);
this->setAttribute(Qt::WA_TranslucentBackground);
}
dtkWidgetsMenuBarContainerSlide::dtkWidgetsMenuBarContainerSlide(dtkWidgetsMenuBar *mb, dtkWidgetsMenuBarContainer *c) : QFrame(c), menu_bar(mb)
......@@ -243,6 +246,9 @@ dtkWidgetsMenuBarContainerSlide::dtkWidgetsMenuBarContainerSlide(dtkWidgetsMenuB
layout->setAlignment(Qt::AlignTop);
this->touch(mb, c);
this->setAttribute(Qt::WA_NoSystemBackground);
this->setAttribute(Qt::WA_TranslucentBackground);
}
dtkWidgetsMenuBarContainerSlide::~dtkWidgetsMenuBarContainerSlide(void)
......
......@@ -118,6 +118,14 @@ 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,6 +59,14 @@ 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;
......@@ -95,6 +103,14 @@ 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,6 +151,14 @@ 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,6 +60,7 @@ public slots:
protected:
void enterEvent(QEvent *);
void leaveEvent(QEvent *);
void paintEvent(QPaintEvent *);
private:
class dtkWidgetsOverlayPanePrivate *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