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

(Bug): Qt5: Knob background color doesn't change color when setting keyframe or expression #846

Closed
7 of 10 tasks
devernay opened this issue Nov 12, 2022 · 9 comments
Closed
7 of 10 tasks
Labels
type:bug Something isn't working

Comments

@devernay
Copy link
Member

Make sure to follow our issue report guidelines

  • I'm using the latest version of Natron (not required but recommended)
  • I've restarted Natron and the issue persists
  • I've run Natron via the command line and the issue persists
  • I've followed the contributing guidelines to the best of my understanding
  • My issue is not on the issue tracker or in a pull request already (go search for it and dig around a little bit!)
  • This bug is reproducible

Natron version

2.5

Operating system

macOS Monterey / Qt5

System specs

No response

Did you install Natron using the official installer?

  • Yes, I used the official installer
  • No, I installed from a binary archive
  • No, I compiled Natron from sources
  • No, I installed Natron via another method

Custom installation path

No response

What were you trying to do?

set a keyframe or expression on a knob.

What did you expect to happen? What happened instead?

Keyframe should change the knob background to blue, expression to green

Qt4 version works fine

Step-by-step reproduction instructions

create any node (eg blur)

set a keyframe or expression on any parameter

Additional details

No response

@devernay devernay added the type:bug Something isn't working label Nov 12, 2022
@devernay
Copy link
Member Author

@YakoYakoYokuYoku can you take a look?

@devernay
Copy link
Member Author

Note that it works fine on pulldowns and checkboxes:
image

@YakoYakoYokuYoku
Copy link
Member

Note that it works fine on pulldowns and checkboxes

Worth to highlight that both ComboBox and AnimatedCheckBox use paintEvent to set their colors and not the mainstyle.qss styling sheet. I'll have to see a way to set the color values properly in the QSS file.

@YakoYakoYokuYoku
Copy link
Member

Found it. Because Qt style sheets use the class name of a widget to apply CSS properties to it and Qt5 metaobjects store the class name with the namespace, then there's no way to select the widgets without their namespaces. The official Qt documentation recommends to prepend the namespace with -- instead of :: (e.g. Natron--SpinBox), Qt4 supports this kind of selections too. To fix this we have to prepend Natron-- to the corresponding patterns in mainstyle.qss or remove the Natron namespace from the C++ sources, the former being the easier but less flexible solution.

@devernay
Copy link
Member Author

Nice find! I guess this means we'll have to make a Qt5-specific mainstyle.css (mainstyle-qt5.qss?). It will also break users' stylesheets, but if they installed one they should be able to edit it.
I want to push Natron 2.5 as fast as possible (it's been waiting since July) so that we can start testing the Qt5 version and working on the build scripts (which represents a large amount of work). Most users rely on our binaries to use Natron.

Natron 2.5 is ready for every platform except WIndows @rodlie #828

@YakoYakoYokuYoku
Copy link
Member

Nice find! I guess this means we'll have to make a Qt5-specific mainstyle.css (mainstyle-qt5.qss?). It will also break users' stylesheets, but if they installed one they should be able to edit it.

I was thinking for other options, one is to edit the CSS at load time which could be tricky but doable, another is to use both an application style and a color scheme like what Krita and many other Qt/KDE apps do.

I want to push Natron 2.5 as fast as possible (it's been waiting since July) so that we can start testing the Qt5 version and working on the build scripts (which represents a large amount of work). Most users rely on our binaries to use Natron.

Natron 2.5 is ready for every platform except WIndows @rodlie #828

I've been thinking, couldn't have been better to do a release candidate? 🤔

@devernay
Copy link
Member Author

devernay commented Nov 19, 2022

I've been thinking, couldn't have been better to do a release candidate? 🤔

We (people doing the actual builds) don't have time for that, and we don't have enough testers anyway (two 2.5.0 alpha versions published, no feedback). Since there is almost 100% compatibility with 2.4, and it's easy to rollback, I don't think it's necessary.

@devernay
Copy link
Member Author

And btw v2.5.0 is marked as a pre-release, and people can already download the builds. We may end up starting with a 2.5.1 release if anything is wrong with these.

rodlie added a commit to rodlie/Natron that referenced this issue Apr 22, 2023
Fixes some issues with Qt5.

Ref: NatronGitHub#846
devernay pushed a commit that referenced this issue Apr 22, 2023
Fixes some issues with Qt5.

Ref: #846
@devernay
Copy link
Member Author

fixed by #873

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants