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

feat: add border for qrcode

This commit is contained in:
TriKriSta 2019-04-10 23:18:31 +03:00
parent 216766061c
commit 191f89ffa4

View File

@ -94,6 +94,8 @@ void QRWidget::paintImage()
painter.setPen(Qt::NoPen); painter.setPen(Qt::NoPen);
painter.drawRect(0, 0, size.width(), size.height()); painter.drawRect(0, 0, size.width(), size.height());
painter.setBrush(fg); painter.setBrush(fg);
painter.scale(0.96, 0.96);
painter.translate(size.width() * 0.02, size.height() * 0.02);
const int s = qr->width > 0 ? qr->width : 1; const int s = qr->width > 0 ? qr->width : 1;
const double w = width(); const double w = width();
const double h = height(); const double h = height();