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

OSX migrate to NSCell based renderer #24004

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

csomor
Copy link
Contributor

@csomor csomor commented Oct 27, 2023

the old HITheme renderer does not support dark mode for the disclosure button, we should move to use NSCells for rendering in the future, see #24002

the old HITheme renderer does not support dark mode for the disclosure button, we should move to use NSCells for rendering in the future
@craftyjon
Copy link
Contributor

craftyjon commented Oct 27, 2023

Looks good to me! Thank you :)

image

Note: I tested this by manually cherry-picking to KiCad's 3.2-based branch and then hacking up the makefiles. This means it should be straightforward to backport once a final version is merged.

unfortunately a huge diff, but the rearrangements also happen if I do the change by hand on the existing project …
@vadz
Copy link
Contributor

vadz commented Oct 31, 2023

Stefan, is this ready to be merged? If so, I'd like to (squash) merge it removing the old files to get the correct diffs for this commit. Please let me know if I should do this, TIA!

@csomor
Copy link
Contributor Author

csomor commented Nov 1, 2023

@vadz it's not ready, I still have a focus-clear-redraw issue I have to investigate, and I thought I'd post to wx-users to get more testing, but if this looks like it could hinder things, I could introduce a #ifdef internally to have the older code active and allow for testers to enable it on master

@vadz
Copy link
Contributor

vadz commented Nov 2, 2023

IME asking people to test things really works, unfortunately. Other than those directly involved in the PR/bug report, few people test new code until it's merged into master. So if you're confident that this is the right way to do it and can fix the bugs you see, I'd merge it first and ask for testing afterwards.

@craftyjon
Copy link
Contributor

Other than those directly involved in the PR/bug report, few people test new code until it's merged into master. So if you're confident that this is the right way to do it and can fix the bugs you see, I'd merge it first and ask for testing afterwards.

For what it's worth, we have this same experience with KiCad and thus also have adopted a "merge early" philosophy

@vadz vadz marked this pull request as draft November 8, 2023 18:33
@vadz
Copy link
Contributor

vadz commented Nov 8, 2023

Stefan, I've converted this to draft for now, please make it "Ready for review" when you consider it in an acceptable (even if not perfect) state. TIA!

@csomor
Copy link
Contributor Author

csomor commented Nov 8, 2023

Stefan, I've converted this to draft for now, please make it "Ready for review" when you consider it in an acceptable (even if not perfect) state. TIA!

Thanks, although you are not fond of them, I'm really thinking about adding #ifdefs with the old code - to support better A/B testing

@vadz
Copy link
Contributor

vadz commented Nov 8, 2023

Thanks, although you are not fond of them, I'm really thinking about adding #ifdefs with the old code - to support better A/B testing

If we do this, we should at least enable the new version by default. But I'd indeed prefer to avoid having them, if only because it would be better if this appeared as a change of the existing code (which will be the case if it's replaced by the new version) instead of addition of another copy of it and then removal of the original version.

@csomor
Copy link
Contributor Author

csomor commented Nov 9, 2023

Thanks, although you are not fond of them, I'm really thinking about adding #ifdefs with the old code - to support better A/B testing

If we do this, we should at least enable the new version by default.

agreed on that

But I'd indeed prefer to avoid having them, if only because it would be better if this appeared as a change of the existing code (which will be the case if it's replaced by the new version) instead of addition of another copy of it and then removal of the original version.

Yes, this would be better. But the problem is: the objective-c++ needs the .mm ending.
So changing the original to .mm and leave it where it is or move it and then apply the changes would work (note that not all methods can be replaced by the NSCell based implementations, but the remaining ones are still working properly for dark mode)

@vadz
Copy link
Contributor

vadz commented Nov 10, 2023

Just to be sure (I think you already know this, but, again, just in case): we can move the file, Git doesn't care about its path (nor extension) and history would still look correct in this case.

@csomor
Copy link
Contributor Author

csomor commented Nov 10, 2023

yes, but I realized that I have started the wrong way in the branch, with the duplicate , I'll create a new one and setup this with the correct history

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.

None yet

3 participants