-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
8332416: Add more font selection options to Font2DTest #19273
Conversation
👋 Welcome back prr! A progress list of the required criteria for merging this PR into |
@prrace This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 84 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
BTW, it is probably obvious , but maybe 50% of "reviewing" this will be pulling it down and building it locally and trying it out. Very hard to review by code changes alone. |
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 have an observation, not sure if it's supposed to be this way or not. The Style/SubFamily type selected in other mentioned type (Select font using Family and Style/SubFamily/Full Name) has an impact on each other type. For example, if we select bold as Style and then in type 2 we select SubFamily as .plain then it'll be bold+.plain right? Or its supposed to be only .plain in type 2?
else if (familyChars[familyIndex] == ' ' || familyChars[familyIndex] == '-') { | ||
familyIndex++; | ||
} | ||
else if (fullChars[fullIndex] == ' ' || fullChars[fullIndex] == '-') { |
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.
else if (fullChars[fullIndex] == ' ' || fullChars[fullIndex] == '-') { | |
else if (fullChars[fullIndex] == ' ' || fullChars[fullIndex] == '-') { |
Probably not. But if we are using Family + SubFamily you don't see the "Style" menu, but I think you are right that it probably remembers the last selected style and applies it and then the substitution will happen as described above, but the UI doesn't show this. |
It was a bit more than that, but I think it is behaving sensibly now. Please take another look. |
Yeah, it's fine now. The reset is happening and the selections are independent of its type. |
Changes looks good after the following fix. Save and Load option works as expected. |
f.addWindowListener( new WindowAdapter() { | ||
public void windowOpening( WindowEvent e ) { f2dt.repaint(); } | ||
public void windowClosing( WindowEvent e ) { System.exit(0); } |
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.
@prrace Minor Spacing issue. I see this pattern in the original code as well, could be a quick find+replace all fix for opening and closing brace. But then again it would also create a lot of git diff footprint along with the fix.
f.addWindowListener( new WindowAdapter() { | |
public void windowOpening( WindowEvent e ) { f2dt.repaint(); } | |
public void windowClosing( WindowEvent e ) { System.exit(0); } | |
f.addWindowListener( new WindowAdapter() { | |
public void windowOpening(WindowEvent e) { f2dt.repaint(); } | |
public void windowClosing(WindowEvent e) { System.exit(0); } |
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.
There's a LOT of such things, that my itchy fingers wanted to fix, but I deliberately resisted temptation and don't see any reason to pick on a few random infractions to fix.
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.
Agreed.
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.
Yeah, agreed on this.
@@ -740,7 +740,8 @@ private void resetScrollbar( int oldValue ) { | |||
verticalBar.setValues( oldValue, numCharDown, 0, totalNumRows ); | |||
} | |||
if ( totalNumRows <= numCharDown && drawStart == 0) { |
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.
Is this check needed now since both if and else condition do the same thing?
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 left it because I might want to re-enable this in the future if / when I figure out why the disabled Nimbus scroll bar just looks like a blank piece of window.
public void windowClosing( WindowEvent e ) { System.exit(0); } | ||
}); | ||
|
||
f.getContentPane().add( f2dt ); |
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.
Since this is new code, we can remove getContentPane which is not needed for add
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.
It isn't "new code". I just moved the block inside invokeAndWait because starting the UI
on the main thread can be a real source of hangs. So these lines are indented more but not new.
/integrate |
Going to push as commit 97ee2ff.
Your commit was automatically rebased without conflicts. |
Enhance Font2DTest as follows
The default is (1) so nothing looks different except that I updated the UI to use Nimbus instead of Metal.
There's new code to gather these ways of referencing the fonts.
Also changes were needed for the "Save/Load" options to include the new UI state and font settings.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19273/head:pull/19273
$ git checkout pull/19273
Update a local copy of the PR:
$ git checkout pull/19273
$ git pull https://git.openjdk.org/jdk.git pull/19273/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 19273
View PR using the GUI difftool:
$ git pr show -t 19273
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19273.diff
Webrev
Link to Webrev Comment