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
Possible inconsistencies on large monitor with scaling #523
Comments
That's strange 😕 Are you modifying the default font in some way in your app. Or do you set system properties GTinOZ's problem: Font size is correct at startup, but changes after a few seconds to double size (from 17px to 34px). Icons and gaps are unchanged. I've no idea why this happens. FlatLaf gets the font from desktop property To find out whether this is the case, you could add some logging to your app. E.g.: // setup FlatLaf
FlatLightLaf.setup();
Toolkit toolkit = Toolkit.getDefaultToolkit();
// log initial font
log( toolkit.getDesktopProperty( "win.messagebox.font" ) );
// listen to system font changes
toolkit.addPropertyChangeListener( "win.messagebox.font", e -> {
log( toolkit.getDesktopProperty( "win.messagebox.font" ) );
} ); BTW the default font on Windows is:
That's strange because Java 17 apps automatically change scaling when Windows display scaling is changed. Another (probably unrelated) thing I noticed on the screenshots from GTinOZ and Dani82 is that both are not getting FlatLaf's window decorations (dark title bar and menubar embedded into window title bar), but paultaylor's screenshot show them. So either both use Windows on ARM processors (which FlatLaf does not yet support), To fix this, you could extract the DLLs from flatlaf.jar, distribute them with your app, and set system property |
thankyou for looking at this, I think the dll extraction thing is likely the problem. On my devlopment machine where i am adminstrator it is all fine, but I just downloaded my application and tried it another PC, and it also incorrectly continued to show lighttitle bars when in dark mode. I'm using the standard jpackage tool for Windows, so for the existing installed version of Jaikoz on my dev machine I have removed the dlls from flatlaf.jar to sucessfully replicate the the titlebar issue, and then I tried to fix it by putting the dlls into C:/Program Files/Jthink/Jaikoz/app and adding a line to Jaikoz.cfg
but it has no effect, the title bar remains light So I seem to be doing something wrong but cant see what ? |
To answer some of your other questions They are on Intel not arm, Im not modifying fonts or using any flatlaf scaling |
Okay fixed the dll issue, didnt realize have to store in folder structure that matches the jar, i.e |
Hmm, that's not true. If system property FlatLaf/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatWindowsNativeWindowBorder.java Lines 133 to 141 in 37c375e
|
OK, sorry must just be me getting confused have that bit working now. One customer got round issue by using -Dflatlaf.uiScale to shrink size, but don't know the underlying cause. |
Please see issue #580, I think you are also encountering the problem where JPackage creates a windows executable without a manifest, this causes problems with dpi-awareness which can result in large fonts. I was able to solve this by using OpenJDK 19 for creating a JPackage'd app. |
I have recently moved to Flatlaf, I also moved from Java 11 to Java 17. A couple of user who use scaling on their large monitors have complained the text in my application is now too large compared to other applications. Even without scaling the text seems to be larger than other apps, however in my test on normal size monitor it looks fine and is actually smaller then other apps.
I'm really not clear if there is a Flatlaf issue, Java 17 issue, coding error in my app or user error, but if you could offer any assistance would be appreciated.
Rather than repeat everything here the thread with screenshots can be seen at
https://community.jthink.net/t/blur-update-annoying-enlarged-view/10735/18
The text was updated successfully, but these errors were encountered: