Commit 361d01d5 authored by Waqar Ahmed's avatar Waqar Ahmed Committed by Christoph Cullmann
Browse files

Draw a tiny shadow to make the button look more real

parent bf73e9dd
......@@ -173,10 +173,16 @@ public:
int i = 0;
painter->setRenderHint(QPainter::Antialiasing); // :)
for (const auto& pxm : btnRects) {
// draw rounded rect
// draw rounded rect shadown
painter->setPen(Qt::NoPen);
painter->setBrush(option.palette.button());
QRect r(dx, y, pxm.first.width(), pxm.first.height());
auto shadow = r.translated(0, 1);
painter->setBrush(option.palette.shadow());
painter->drawRoundedRect(shadow, 3, 3);
// draw rounded rect itself
painter->setBrush(option.palette.button());
painter->drawRoundedRect(r, 3, 3);
// draw text inside rounded rect
......
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