Merge pull request #10116 from malleoz/tas-input-gui-changes

StickWidget: Inscribe stick circle within a square
This commit is contained in:
JMC47 2021-09-20 14:04:36 -04:00 committed by GitHub
commit 7ec02ee4d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -47,6 +47,9 @@ void StickWidget::paintEvent(QPaintEvent* event)
const int diameter = std::min(width(), height()) - PADDING * 2;
// inscribe the StickWidget inside a square
painter.fillRect(PADDING, PADDING, diameter, diameter, Qt::lightGray);
painter.setBrush(Qt::white);
painter.drawEllipse(PADDING, PADDING, diameter, diameter);