diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2020-12-22 15:43:13 +0100 |
---|---|---|
committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2021-01-29 07:26:56 +0100 |
commit | 0ca3f1732ae9aa8e138142890a35c0b183c55ffd (patch) | |
tree | 0eec13238c7138c484fcebd8a3070b6904cc0c80 /src/widgets/styles/qcommonstyle.cpp | |
parent | 180c662b0790c6eceffdcb4661681d7df1541a2d (diff) |
QDial: fix painting QDial when the rect has an offset
When the QDial should be painted with an offset, the dial was not draw
correct.
Fixes: QTBUG-89574
Change-Id: I646c3d42fba34e8c603a8f81f363ed827f04d5de
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/widgets/styles/qcommonstyle.cpp')
-rw-r--r-- | src/widgets/styles/qcommonstyle.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp index 3bdababe2c..ff115596bf 100644 --- a/src/widgets/styles/qcommonstyle.cpp +++ b/src/widgets/styles/qcommonstyle.cpp @@ -3230,8 +3230,8 @@ static StaticPolygonF<3> calcArrow(const QStyleOptionSlider *dial, qreal &a) a = (Q_PI * 8 - (currentSliderPosition - dial->minimum) * 10 * Q_PI / (dial->maximum - dial->minimum)) / 6; - int xc = width / 2; - int yc = height / 2; + int xc = width / 2 + dial->rect.left(); + int yc = height / 2 + dial->rect.top(); int len = r - QStyleHelper::calcBigLineSize(r) - 5; if (len < 5) |