Commit 46043ff1 authored by Niklas Freund's avatar Niklas Freund
Browse files

Fixed bitset buttons being blurry

parent 11ccb441
......@@ -44,15 +44,15 @@ void BitButton::paintEvent(QPaintEvent *)
}
// Calculate button size (make it square)
QRectF square = rect();
QRect square = rect();
if (square.width() > square.height())
square.setWidth(square.height());
else if (square.height() > square.width())
square.setHeight(square.width());
// Draw button
painter.translate(QPointF(0.0, (rect().height() - square.height()) / 2.0)); // center button
painter.drawRect(square.adjusted(1.0, 1.0, -1.0, -1.0));
painter.translate(QPoint(0, (rect().height() - square.height()) / 2)); // center button
painter.drawRect(square.adjusted(1, 1, -1, -1));
}
//------------------------------------------------------------------------------
......
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