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

Modernize UI using flatlaf. #141

Merged

Conversation

mtorres10
Copy link
Contributor

@mtorres10 mtorres10 commented Apr 22, 2022

Add flatlaf dependency.
Change main panels margins to improve visuals.

This PR addresses enhancement request: #140

This is the new look, @superblaubeere27 what do you think?:
New Look and feel

Change form main panels margins to improve visuals
@@ -124,7 +126,7 @@ public static void main(String[] args) throws Exception {

try {
if (Utils.isWindows()) {
UIManager.setLookAndFeel("com.bulenkov.darcula.DarculaLaf");
FlatDarculaLaf.setup();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Only applied to windows, as it seems it is project preference to use native look and feel when using other Operating Systems

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="me.superblaubeere27.jobf.ui.GUI">
<grid id="27dc6" binding="panel1" default-binding="true" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<margin top="0" left="1" bottom="0" right="1"/>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

All changes here are margin changes for the main form controls

@@ -79,7 +79,7 @@ public GUI(String updateCheckResult) {
setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
setContentPane(panel1);
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
setSize((int) (screenSize.getWidth() / 2), (int) (screenSize.getHeight() / 1.9));
setSize((int) (screenSize.getWidth() / 2), (int) (screenSize.getHeight() / 1.7));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Had to change this, because the flatlaf tabs height it taller than, default one.

Change form main panels margins to improve visuals
Change panels margins to improve visuals
Change windows size to default instead of basing it of a calculation from screensize.
Change scripting field to top/left with fill.
Change panels margins to improve visuals
Change windows size to default instead of basing it of a calculation from screensize.
Change scripting field to top/left with fill.
Change panels margins to improve visuals
Change windows size to default instead of basing it of a calculation from screensize.
Change scripting field to top/left with fill.
@superblaubeere27
Copy link
Owner

Hopefully increases compatibility 👍🏻

@superblaubeere27 superblaubeere27 merged commit 52ff3b7 into superblaubeere27:master Apr 26, 2022
@mtorres10
Copy link
Contributor Author

mtorres10 commented Apr 27, 2022

@superblaubeere27 Quick note, this is only applied to windows, but noticed some issues with mac on later jdks 15 & 17, when using UIManager.getSystemLookAndFeelClassName(). This display issues seem to be gone when applying this LAF too. Will confirm and open a new PR, for your review. I per my notes this new UI is only applied to windows, because the project seems to favor native LAF for mac.

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.

None yet

2 participants