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

Fix white glitches occurring while resizing #304

Closed
wants to merge 4 commits into from
Closed

Fix white glitches occurring while resizing #304

wants to merge 4 commits into from

Conversation

anticleiades
Copy link
Contributor

@anticleiades anticleiades commented Jan 15, 2022

Fix white glitches occurring while resizing JFrame.
Proposed fix:
– add the missing "control" property to each included theme.

GIF showing the glitch:
bug

Result of the proposed fix:
fix

Test environment:
OS: macOS 12.1 (21C52)
Architecture: Intel x64
JVM Vendor: JetBrains s.r.o
Java Runtime Version: 11.0.12

@anticleiades anticleiades changed the title Fix white glitches occurring while resizing Fix white glitches occurring while resizing in some systems Jan 15, 2022
@anticleiades anticleiades changed the title Fix white glitches occurring while resizing in some systems Fix white glitches occurring while resizing Jan 15, 2022
Copy link
Owner

@weisJ weisJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing this. I wasn’t aware that the control property could be used to change the native window background. See above for a recommendation on how to avoid duplicating the property in every theme.

@@ -83,6 +83,7 @@ Theme.highContrast = true
%widgetFillDefault = #00D1E5

####Controls####
%control = #FFFFFF
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t like that this duplicates the background property in every theme. I’d suggest to instead set the property in ThemeDefaultsInitTask based on the value of background.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right — this is a preferable solution indeed. But, in order to avoid background property duplication, what about creating a global reference to background property in /darklaf/core/src/main/resources/com/github/weisj/darklaf/globals.properties?
Schermata 2022-01-16 alle 05 34 10
Or, just for clarity's sake, a better approach would be to create ThemeDefaultsInitTask#initControl method for initialising the control property?
Thanks in advance.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That’s actually the better solution :). Maybe add a comment explaining why it’s needed as well.

@anticleiades
Copy link
Contributor Author

I apologise for messing up things with the repository so, unfortunately, I needed to re-fork your repo, but I have some good news: I have also committed the requested changes to the new fork. In my opinion it's ok to create a new PR and close the PR we are writing on. What I am supposed to do, in your opinion though?
Thank you in advance

@weisJ
Copy link
Owner

weisJ commented Jan 18, 2022

You can just create a new PR thanks a lot :)

@anticleiades
Copy link
Contributor Author

Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants