Commit 788d0860 authored by KLOCZKO Thibaud's avatar KLOCZKO Thibaud

Add theming.

parent 7dc5f9fd
......@@ -98,14 +98,14 @@ void dtkWidgetsMenuNavigationFacade::paintEvent(QPaintEvent *event)
{
QFrame::paintEvent(event);
dtkFontAwesome::instance()->setDefaultOption("color", dtkThemesEngine::instance()->color("@bgalt"));
dtkFontAwesome::instance()->setDefaultOption("color", dtkThemesEngine::instance()->color("@base0"));
QRect rect(5, 10, 28, 32);
QPainter painter(this);
painter.setRenderHints(QPainter::Antialiasing);
painter.setPen(Qt::NoPen);
painter.setBrush(dtkThemesEngine::instance()->color("@base6"));
painter.setBrush(dtkThemesEngine::instance()->color("@base7"));
painter.drawRoundedRect(rect, 5, 5);
painter.drawPixmap(10, 20, 16, 16, dtkFontAwesome::instance()->icon(fa::chevronleft).pixmap(16, 16));
painter.setPen(dtkThemesEngine::instance()->color("@base8"));
......@@ -207,13 +207,10 @@ void dtkWidgetsMenuItemFacade::paintEvent(QPaintEvent *event)
if(menu_item->isCustom())
return;
dtkFontAwesome::instance()->setDefaultOption("color", ::fg_color);
dtkFontAwesome::instance()->setDefaultOption("color", dtkThemesEngine::instance()->color("@fg"));
QPainter painter(this);
painter.setRenderHint(QPainter::Antialiasing);
// painter.setPen(::bg_color);
// painter.setBrush(::bg_color);
// painter.drawRoundedRect(event->rect(), 5, 5);
painter.setPen(dtkThemesEngine::instance()->color("@fg"));
painter.drawPixmap(10, 10, 16, 16, dtkFontAwesome::instance()->icon(this->menu_item->icon()).pixmap(16, 16));
painter.drawText(::margin + 16 + ::margin, ::margin * 2 + 2, this->menu_item->title());
......
......@@ -53,11 +53,6 @@ dtkWidgetsMenuItemDIY::~dtkWidgetsMenuItemDIY(void)
delete d;
}
void dtkWidgetsMenuItemDIY::save(void)
{
// d->source->setParent(nullptr);
}
QWidget *dtkWidgetsMenuItemDIY::widget(void)
{
return d->widget;
......@@ -87,11 +82,6 @@ dtkWidgetsMenuItemWorkspace::~dtkWidgetsMenuItemWorkspace(void)
delete d;
}
void dtkWidgetsMenuItemWorkspace::save(void)
{
// d->widget->setParent(nullptr);
}
QWidget *dtkWidgetsMenuItemWorkspace::widget(void)
{
return d->widget;
......@@ -123,9 +113,7 @@ dtkWidgetsMenuItemTheme::~dtkWidgetsMenuItemTheme(void)
{
delete d;
}
void dtkWidgetsMenuItemTheme::save(void)
{
}
QWidget *dtkWidgetsMenuItemTheme::widget(void)
{
if (!d->widget) {
......
......@@ -28,9 +28,6 @@ public:
dtkWidgetsMenuItemDIY(const QString& title, QWidget *widget);
~dtkWidgetsMenuItemDIY(void);
public:
void save(void) override;
public:
QWidget *widget(void) override;
......@@ -50,9 +47,6 @@ public:
dtkWidgetsMenuItemWorkspace(const QString& title, dtkWidgetsWorkspaceStackBar *bar);
~dtkWidgetsMenuItemWorkspace(void);
public:
void save(void) override;
public:
QWidget *widget(void) override;
......@@ -72,9 +66,6 @@ public:
dtkWidgetsMenuItemTheme(const QString& theme);
~dtkWidgetsMenuItemTheme(void);
public:
void save(void) override;
public:
QWidget *widget(void) override;
......
......@@ -92,9 +92,6 @@ public:
public:
virtual QWidget *widget(void) = 0;
public:
virtual void save(void) = 0;
signals:
void clicked(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