1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

FTW: 1px spacing instead of 2px

This commit is contained in:
krepa098 2015-02-14 12:21:03 +01:00
parent 9499909f8b
commit 108d2725e6

View File

@ -179,7 +179,7 @@ void FileTransferWidget::paintEvent(QPaintEvent *)
qreal ratio = static_cast<qreal>(geometry().height()) / static_cast<qreal>(geometry().width()); qreal ratio = static_cast<qreal>(geometry().height()) / static_cast<qreal>(geometry().width());
const int r = 24; const int r = 24;
const int buttonFieldWidth = 34; const int buttonFieldWidth = 34;
const int lineWidth = 2; const int lineWidth = 1;
// draw background // draw background
if(drawButtonAreaNeeded()) if(drawButtonAreaNeeded())
@ -191,7 +191,7 @@ void FileTransferWidget::paintEvent(QPaintEvent *)
{ {
// draw button background (top) // draw button background (top)
painter.setBrush(QBrush(buttonColor)); painter.setBrush(QBrush(buttonColor));
painter.setClipRect(QRect(width()-buttonFieldWidth+lineWidth,0,buttonFieldWidth,height()/2-lineWidth/2)); painter.setClipRect(QRect(width()-buttonFieldWidth+lineWidth,0,buttonFieldWidth,height()/2-ceil(lineWidth/2.0)));
painter.drawRoundRect(geometry(), r * ratio, r); painter.drawRoundRect(geometry(), r * ratio, r);
// draw button background (bottom) // draw button background (bottom)