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

New GUI Look and Feel #149

Merged
merged 106 commits into from
Dec 6, 2020
Merged

New GUI Look and Feel #149

merged 106 commits into from
Dec 6, 2020

Conversation

clausnagel
Copy link
Member

@clausnagel clausnagel commented Nov 29, 2020

This PR proposes a more modern Look and Feel for the Importer/Exporter GUI based on FlatLaf. I did not redesign the GUI but just "flattened" it a bit (for instance, by removing a lot or borders). Make sure to check out a really nice new feature which comes with FlatLaf - it is available from the "View" menu.

FlatLaf is cross-platform and scales on HiDPI displays. I tested the new LaF under Windows 10 and Ubuntu 20.

Most of the commits in this PR are just about GUI changes. But some of them have a greater impact:

  • I removed the Workspace dialog from all operation tabs. The workspace settings only make sense for Oracle but not for PostgreSQL. If we need them at all, I propose to integrate them on the Database tab as special fields just for Oracle databases. The workspace settings on the Database tab would then apply to all operations.
  • I rearranged the KML/COLLADA/glTF rendering preferences. There was a lot of duplicate code and, in fact, for many settings only the values entered for the Building feature were taken into account. I moved all general rendering options (like whether to use face normals, texture atlases, etc.) from the feature-specific settings to the General tab. This leaves only styling as feature-specific setting, which makes much more sense to me.

Note that this PR depends on #147. So, if you like the new LaF, we need to merge #147 first :-) #147 has been merged.

If you use gradlew installDist for building a new Importer/Exporter for testing, make sure to first delete the plugins folder before starting the app. The plugins have not been moved to the new CLI yet and will throw errors preventing the Importer/Exporter from starting.

@Son-HNguyen
Copy link
Member

@clausnagel that would be great to adjust the window size with respect to the screen resolutions.

@clausnagel
Copy link
Member Author

Hm, I wonder whether we should also use FlatLaf for the installer. I don't want to rework the UI components themselves. But the installer does not scale well on my HiDPI display and is hardly readable. FlatLaf could help to fix this.

Copy link
Member

@Son-HNguyen Son-HNguyen left a comment

Choose a reason for hiding this comment

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

e24c89b 👍

@clausnagel
Copy link
Member Author

e24c89b 👍

Does it work for you?

While working on it, I realized that Java itself has still bugs especially if you use multiple screens with different scale factors (like in my environment). For instance, moving the window from one screen to the other, detaching the console or restoring the default layout can result in strange situations in such settings. I tried to find workarounds but have now decided to keep the current implementation as is and wait for a bugfix in Java.

@Son-HNguyen
Copy link
Member

It does work for me with a dual monitor setup, but both have the same resolution of 2560x1440.

@yaozhihang
Copy link
Member

yaozhihang commented Dec 5, 2020

@clausnagel Nice work! from my side, this PR is OK for merge.

@clausnagel clausnagel merged commit 7de63b8 into master Dec 6, 2020
@clausnagel clausnagel deleted the gui-new-laf branch December 6, 2020 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants