mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 08:09:26 +01:00
Inscribe StickWidget ellipse in square
Previously, it was not clear where the boundary of the StickWidget was when interacting outside of the circle. This aims to restore the gray square present in the Wx-era.
This commit is contained in:
parent
6129290d31
commit
3bc9f66336
@ -47,6 +47,9 @@ void StickWidget::paintEvent(QPaintEvent* event)
|
|||||||
|
|
||||||
const int diameter = std::min(width(), height()) - PADDING * 2;
|
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.setBrush(Qt::white);
|
||||||
painter.drawEllipse(PADDING, PADDING, diameter, diameter);
|
painter.drawEllipse(PADDING, PADDING, diameter, diameter);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user