-
Notifications
You must be signed in to change notification settings - Fork 234
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
Modernize UI using flatlaf. #141
Conversation
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(); |
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.
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"/> |
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.
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)); |
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.
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.
Hopefully increases compatibility 👍🏻 |
@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. |
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](https://user-images.githubusercontent.com/44622638/164764282-cbd35723-3983-4a9b-b5f2-5fa3310f0131.gif)