-
Notifications
You must be signed in to change notification settings - Fork 228
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
Commentpane to swing component #696
Open
toomasr
wants to merge
8
commits into
featurecat:master
Choose a base branch
from
toomasr:commentpane-to-swing-component
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The GUI is repainted based on the how much chatter is coming from Leelaz. This patch does only a repaint if 600ms has passed since the previous. This affects only paints from Leelaz.
After extracting the node tree for some reason the pixels for Y are a little off. This at least makes it work most of the time OK.
Thanks for the PR. I'll review the changes. Although I'm a bit hesitant about the 700ms updating optimization. Because the engine updates 10 times per second is actually tweakable in the config. Once I take a closer look I'll be able to give better feedback. |
Oh, if that is configurable then my patch is definitely not needed. Maybe should just consider different defaults and thats it. |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was bored yesterday and I was going through issues in Lizzie and I saw that wordwrap was requested for the comment pane in issue #676
I jumped into the code and realised that all components are converted into graphics and then those are stitched together for the UI.
As a thought exercise I extracted the comment pane into a separate component, JTextArea. I also had to extract the tree but I still left that as a graphics component.
It could be a step forward to having Java components rather than just graphics.
Another big change in this pull request is I'm skipping a lot of repaints for Leelaz. I saw that the UI sluggish because painting was happening very often when the engine is providing all kind of info. As most of the info you can ignore (it does not matter if the scores change 10 times a second or 2 times) then I'm skipping repaints unless there 700ms has passed since the previous one.
I realise that this is not the best pull request as it is based on my working tree that has other fixes in
it but I'm still submitting this as the component conversion can be taken separately if there is interest.
The same goes for the UI changes.