Skip to content

macOS 26 does not render GraphicsContext Gradients correctly #2840

@neofelis2X

Description

@neofelis2X

Hi, I updated to the new macOS version and it seems Apple is breaking things again.

Operating system: macOS Tahoe 26.2
wxPython version & source: 4.2.4, pypi
Python version & source: 3.12.8, stock

Description of the problem:
Gradients that are created by gc.CreateLinearGradientBrush or gc.CreateRadialGradientBrush are rendered as a solid colour.
I noticed this in our software, but the wxPython demo shows the same behaviour.

Image

Image

Code Example (click to expand)
  # draw gauge background
  gstops = wx.GraphicsGradientStops()
  gstops.SetStartColour(cold)
  gstops.SetEndColour(hot)
  gs = wx.GraphicsGradientStop(medium, x1 / (xE - x0))
  gstops.Add(gs)
  brush = gc.CreateLinearGradientBrush(x0, y0, xE, yE, gstops)
  gc.SetBrush(brush)
  gc.DrawRoundedRectangle(x0, y0, xE, yE, 3)

Would be interesting to know if more people experience this problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions