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 a windows 10 workaround to force dark mode #2216
Conversation
This seems to work well for my machines, looking for more testing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if fyne-cross didn't pick up my vendor folder or if it was this code, but I could not see dark title bars. Sorry for a less than optimal test of this.
I don't know how your vendor is working, but you could try compiling the hello (left in image) or fyne_demo instead? |
I realised that it was possible for FYNE_THEME=light to override the OS detected dark theme. This is now fixed and it might fix your test results @Jacalz . |
Thanks. I'll have a look. I was changing the theme back and forth using .SetTheme() in my app so that might have been the issue, yes. |
Ah, yes the title bar should match OS setting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested with fyne_demo
, verified that the vendor correctly had the replace directive for this change, and added a debug print to verify that fyne-cross pricked up the vendor correctly. The bar is till just white even though I have dark theme set in Windows 10.
You marked this as request changes but its not clear what I can change. I am confused about your comment for vendor and fyne_demo, this code is not in the Fyne vendor folder...? |
I just marked it as requesting changes because it didn't work. Sorry if I should't have done so. As for the reproduce, it's not anything special. I just copied fyne_demo to a new folder. Replaced fyne.io/fyne/v2 with this PR (in go.mod) and vendored it so that fyne-cross would use this code for fyne. Then I just ran it on Windows. Not much more to it. I can't install all the build environments on my Windows machine as it is my school laptop. |
Can't you just test fyne_demo in place ( P.S. marking it changes requested is fine, but I could not progress it so was looking for more info. |
I don't think it works to do it that way. Without vendor information, it just creates a new module file in the directory and uses the latest stable release if I remember correctly. I put in a print line in the vendor folder (with -console passed to fyne-cross) to verify that it was being used, and it was. |
I am still confused about what this has to do with vendor? cross-compiling the fyne_demo from cmd should use the top level go mod file and all of the code in the currently checked out version..? |
Sorry for a late reply. It doesn't quite have anything to do with vendor. I was just bringing it up because I couldn't get this PR to work during testing. Using vendor was just a way to ensure that the contents of this PR got compiled in. |
But it would be helpful if you could try |
I tried this once more, in the way that you suggest and there is no luck getting it working for me when using fyne_demo. The bar is till white no matter the theme. That it my school laptop though, so it might be a few versions behind on Windows 10. Will give it a try on my Gaming computer to see if there is any more luck there. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This did not initially work on my other computer either, but with an update to the latest major Windows 10 version, it worked flawlessly. Seems to be something odd with the older versions of Windows 10 then, but I would call that Microsoft's fault and not ours 🙂 Nice work 👍
This seems to work well for my machines, looking for more testing
Fixes #2184
Checklist: