Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Bug]: Qt5Agg icon remains black in dark mode #30564

Closed as duplicate of#27590
Closed as duplicate of#27590
@LangQi99

Description

@LangQi99

Bug summary

I noticed in a screenshot from another PR that out of the six backends displayed, only the Qt5Agg icon fails to adapt to dark mode. It remains black and blends in with the background, making it difficult to distinguish.

#30554 (comment)

Image

I believe the issue lies in the following code:

ifself.palette().color(self.backgroundRole()).value()<128:icon_color=self.palette().color(self.foregroundRole())mask=pm.createMaskFromColor(QtGui.QColor('black'),QtCore.Qt.MaskMode.MaskOutColor)pm.fill(icon_color)pm.setMask(mask)

It appears the icon is rendered as black regardless of whether theif condition is met. This is likely caused by the linemask = pm.createMaskFromColor(QtGui.QColor('black'), QtCore.Qt.MaskMode.MaskOutColor).

Code for reproduction

importmatplotlibimportmatplotlib.pyplotaspltmatplotlib.use('Qt5Agg')fig,ax=plt.subplots(subplot_kw= {"projection" :"3d"})ax.bar3d([1,1,2,2], [1,2,1,2],0,1,1, [2,3,1,4],axlim_clip=True)plt.show()

Actual outcome

Image

Expected outcome

Image

Additional information

No response

Operating system

MacOS

Matplotlib Version

3.11.0

Matplotlib Backend

Qt5Agg

Python version

No response

Jupyter version

No response

Installation

None

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


      [8]ページ先頭

      ©2009-2025 Movatter.jp