Commit 7624444e authored by WINTZ Julien's avatar WINTZ Julien

Pixel perfect rendering.

parent 7300b0f8
......@@ -42,6 +42,8 @@ int main(int argc, char **argv)
application->initialize();
application->setup(setup);
#if 0
// ///////////////////////////////////////////////////////////////////
// Retrieve an arbitrary parameter
// ///////////////////////////////////////////////////////////////////
......@@ -64,6 +66,8 @@ int main(int argc, char **argv)
// ///////////////////////////////////////////////////////////////////
#endif
return application->exec();
}
......@@ -121,16 +125,16 @@ void setup(dtkApplication *application)
bg->setPixmap(QPixmap(QString(":/main_%1.jpg").arg((count++ % 5) + 1)));
});
dtkWidgetsParameterMenuBarGenerator menubar_generator_1(":parameters_nature_1.json", ":parameters_definition_1.json");
dtkWidgetsParameterMenuBarGenerator menubar_generator_2(":parameters_nature_2.json", ":parameters_definition_2.json");
// dtkWidgetsParameterMenuBarGenerator menubar_generator_1(":parameters_nature_1.json", ":parameters_definition_1.json");
// dtkWidgetsParameterMenuBarGenerator menubar_generator_2(":parameters_nature_2.json", ":parameters_definition_2.json");
application->window()->setCentralWidget(area);
application->window()->menubar()->addMenu(menu_1);
application->window()->menubar()->addMenu(menu_2);
application->window()->menubar()->addMenu(menu_3);
menubar_generator_1.populate(application->window()->menubar());
menubar_generator_2.populate(application->window()->menubar());
// menubar_generator_1.populate(application->window()->menubar());
// menubar_generator_2.populate(application->window()->menubar());
application->window()->populate();
......
......@@ -32,8 +32,6 @@
const int size = 32;
const int margin = 12;
const QColor fg_color = QColor("#aaffffff");
const QColor fg_alt_color = QColor("#aa999999");
// ///////////////////////////////////////////////////////////////////
// Property handler
......@@ -155,6 +153,8 @@ void dtkWidgetsMenuBarButtonCollapse::mousePressEvent(QMouseEvent *event)
this->emit clicked();
this->touch();
event->accept();
}
// /////////////////////////////////////////////////////////////////////////////
......@@ -213,6 +213,8 @@ QSize dtkWidgetsMenuBarButton::sizeHint(void) const
void dtkWidgetsMenuBarButton::mousePressEvent(QMouseEvent *event)
{
this->emit clicked();
event->accept();
}
// /////////////////////////////////////////////////////////////////////////////
......@@ -756,7 +758,7 @@ void dtkWidgetsMenuBar::resizeEvent(QResizeEvent *event)
d->toggle->move(0, event->size().height() - ::size - 2 * ::margin);
d->c->move(this->rect().topRight());
d->c->move(this->rect().topRight() + QPoint(1, 0));
QFrame::resizeEvent(event);
}
......
......@@ -155,15 +155,15 @@ void dtkWidgetsOverlayPane::paintEvent(QPaintEvent *event)
QPainter painter(this);
QColor color = dtkThemesEngine::instance()->color("@bg");
QColor color = dtkThemesEngine::instance()->color("@base4");
color.setAlpha(178);
painter.fillRect(event->rect(), color);
color = dtkThemesEngine::instance()->color("@base2");
color = dtkThemesEngine::instance()->color("@base1");
painter.setPen(color);
painter.drawLine(event->rect().topRight(), event->rect().bottomRight());
painter.drawLine(event->rect().topRight() + QPoint(1, 0), event->rect().bottomRight() + QPoint(1, 0));
}
void dtkWidgetsOverlayPane::addLayout(QLayout *layout)
......
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