From 419e409a4f8a0666c655f509aae2b5e0d07d1746 Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Thu, 13 Oct 2011 15:54:06 +0200 Subject: Draw better looking rounded rectangles Done-with: aportale --- src/other/deviceitem.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/other/deviceitem.cpp b/src/other/deviceitem.cpp index 9bee2da..aa52402 100644 --- a/src/other/deviceitem.cpp +++ b/src/other/deviceitem.cpp @@ -510,8 +510,9 @@ void KeyButton::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, Q_UNUSED(option); Q_UNUSED(widget); if (mMouseOver) { + painter->setRenderHint(QPainter::Antialiasing); painter->setBrush(QColor(255, 255, 0, 50)); - painter->drawRoundedRect(boundingRect(), 5, 5); + painter->drawRoundedRect(boundingRect().adjusted(.5, .5, -1, -1), 5, 5); } } -- cgit v1.2.3