wxWidgets / Phoenix

wxPython's Project Phoenix. A new implementation of wxPython, better, stronger, faster than he was before.
http://wxpython.org/
2.21k stars 509 forks source link

speedmeter.py lost background color #2528

Closed decodeais closed 2 months ago

decodeais commented 3 months ago

Missing typcasts make the background of the speedmeter white This problem seems to appear since python 3.10 on windows, linux, raspian ... After this change it works. please look in the other instruments for similar mistakes, please.

decodeais commented 3 months ago

Should work too. The problem was the floating-point value and your solution fixes it.

Scott Talbert @.***> schrieb am Di., 13. Feb. 2024, 23:25:

@.**** commented on this pull request.

In wx/lib/agw/speedmeter.py https://github.com/wxWidgets/Phoenix/pull/2528#discussion_r1488660123:

@@ -840,7 +840,7 @@ def Draw(self, dc): interface = 0

         for ind in range(numsteps+1):
  • currCol = (r1 + rf, g1 + gf, b1 + bf)
  • currCol = (r1 + int(rf), g1 +int(gf), b1 +int(bf))

⬇️ Suggested change

  • currCol = (r1 + int(rf), g1 +int(gf), b1 +int(bf))
  • currCol = (int(r1 + rf), int(g1 + gf), int(b1 + bf))

— Reply to this email directly, view it on GitHub https://github.com/wxWidgets/Phoenix/pull/2528#pullrequestreview-1879044069, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEEUKHZRPWDKY7YHZILD6VTYTPR4NAVCNFSM6AAAAABDHF4LUSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTQNZZGA2DIMBWHE . You are receiving this because you authored the thread.Message ID: @.***>