Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Qt properties for plot widget colors #3269

Merged
merged 1 commit into from
Nov 16, 2020

Conversation

vallsv
Copy link
Contributor

@vallsv vallsv commented Nov 14, 2020

This PR expose PlotWidget colors as Qt properties. That's a low cost addition to be able to custom style using qss syntax

Here is an example to edit the style of the whole plots.

styleSheet = """
PlotWidget {
    qproperty-backgroundColor: #19232d;
    qproperty-dataBackgroundColor: #19232d;
    qproperty-foregroundColor: #B0B0B0;
}"""
qapp.setStyleSheet(styleSheet)

Here we can see that the plot from the colormap dialog was also patched.
Capture d’écran de 2020-11-14 13-44-18

Changelog:

  • Expose PlotWidget colors as Qt properties

@vallsv vallsv added this to the 0.14 milestone Nov 14, 2020
@t20100 t20100 merged commit 7f3c90b into silx-kit:master Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants