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

[Windows] Paint bleeding when opening popups #172

Open
weisJ opened this issue May 27, 2020 · 51 comments
Open

[Windows] Paint bleeding when opening popups #172

weisJ opened this issue May 27, 2020 · 51 comments
Labels
bug Something isn't working help wanted Extra attention is needed needs reproduction The issue can't be reproduced and needs a reproducible example. windows Related to the windows operating system

Comments

@weisJ
Copy link
Owner

weisJ commented May 27, 2020

@weisJ
I recorded a video so you can look at this problem
https://mega.nz/file/PuAhBYjK#MGC-euIl_ty86a9DsmDzpQBCXz0pcc-dOOmi0p1Uiz4

Originally posted by @Ilolka1337 in #162 (comment)

@weisJ weisJ changed the title Paint bleeding when opening popups [Windows] Paint bleeding when opening popups May 27, 2020
@weisJ weisJ added the bug Something isn't working label May 27, 2020
@weisJ weisJ added the windows Related to the windows operating system label May 27, 2020
@Ilolka1337
Copy link

@weisJ
when will this problem be solved?

@weisJ
Copy link
Owner Author

weisJ commented Jun 2, 2020

@Ilolka1337 I have still yet to reproduce the issue. As I have already mentioned until then there is nothing I can do really. Have you already tried version 2.1.1?

@weisJ weisJ added help wanted Extra attention is needed needs reproduction The issue can't be reproduced and needs a reproducible example. labels Jun 2, 2020
@Ilolka1337
Copy link

@weisJ
Copy link
Owner Author

weisJ commented Jun 5, 2020

Are you building with the newest native binaries?

@Ilolka1337
Copy link

@weisJ
I download from there https://github.com/weisJ/darklaf/actions/runs/121880047
I now have little disk space to store visual studio

@weisJ
Copy link
Owner Author

weisJ commented Jun 7, 2020

Don't worry you won't need visual studio. I was just making sure you are using the latest binaries.


Are you facing the same problems when opening the popup of a JMenuBar?
Also could you try with the following line after installing the laf?

LafManager.install();
JPopupMenu.setDefaultLightWeightPopupEnabled(true);

What happens if you set your display scale to 100%?

@Ilolka1337
Copy link

@weisJ
Copy link
Owner Author

weisJ commented Jun 8, 2020

No need for the video. Could you please answer the remaining two questions?

@Ilolka1337
Copy link

@weisJ

Are you facing the same problems when opening the popup of a JMenuBar?
Also could you try with the following line after installing the laf?

I did not notice a problem with this

What happens if you set your display scale to 100%?

also found no problems

@Ilolka1337
Copy link

@weisJ
what was the problem really?

@weisJ
Copy link
Owner Author

weisJ commented Jun 8, 2020

It seems to be a combination of the heavy weight popup and the display scaling. Although it’s a bit strange that only the combobox popup is affected.

Could you check if using the system laf together with

JPopupMenu.setDefaultLightWeightPopupEnabled(false);

produce the issue?

@Ilolka1337
Copy link

@weisJ
only works if I set true in this parameter

@Ilolka1337
Copy link

image

@Ilolka1337
Copy link

@weisJ
if there are any other problems, I will write to you

@weisJ
Copy link
Owner Author

weisJ commented Jun 8, 2020

@weisJ
only works if I set true in this parameter

What I want you to check is whether using the System LookAndFeel instead of darklaf produces the issue.

UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
JPopupMenu.setDefaultLightWeightPopupEnabled(false);

Even though

JPopupMenu.setDefaultLightWeightPopupEnabled(true);

fixes the issue this isn't the way darklaf is intended to look. This way popups loose their shadow and the edges of the popup may be hard to spot.

@Ilolka1337
Copy link

@Ilolka1337
Copy link

@weisJ
in new updates the same problems again

@Ilolka1337
Copy link

@weisJ only now it is not fixed using JPopupMenu

@weisJ
Copy link
Owner Author

weisJ commented Jul 11, 2020

@weisJ
in new updates the same problems again

Does this mean the problem went away in some intermediate versions?
If not I'll have to say that I never claimed this issue has been resolved and saying that the issue is still
present doesn't add anything to the conversation.

@weisJ only now it is not fixed using JPopupMenu

This honestly reflects more what I am imagining would happen anyway. Good to know the issue
is more consistent now.

Does

LafManager.install();
JPopupMenu.setDefaultLightWeightPopupEnabled(true);

still solve the issue?

@Ilolka1337
Copy link

@weisJ
this problem was fixed in only one version; in new versions the problem appeared again only now it cannot be fixed with JPopupMenu.setDefaultLightWeightPopupEnabled (true);

@weisJ
Copy link
Owner Author

weisJ commented Jul 11, 2020

@weisJ
this problem was fixed in only one version;

By fixed do you mean the issue wasn't present or it could be circumvented by using JPopupMenu.setDefaultLightWeightPopupEnabled (true);? Also which version?

in new versions the problem appeared again only now it cannot be fixed with JPopupMenu.setDefaultLightWeightPopupEnabled (true);

Could you provide sample code to reproduce the issue? Preferably for the popup menu case.

@Ilolka1337
Copy link

By fixed do you mean the issue wasn't present or it could be circumvented by using JPopupMenu.setDefaultLightWeightPopupEnabled (true);? Also which version?

it was fixed in one of the versions but I decided to install each new one so I don't remember the exact version
now JPopupMenu.setDefaultLightWeightPopupEnabled (true); no longer works as a solution to the problem, I don't know what to do

@weisJ
Copy link
Owner Author

weisJ commented Jul 22, 2020

Well couldn’t you try out the last few versions and check whether it works? Knowing which version doesn’t have the problem would be a great benefit in solving it.

@Ilolka1337
Copy link

@weisJ in 2.4.2-SNAPSHOT JPopupMenu works again and without JPopupMenu the white background pops up again

@Ilolka1337
Copy link

@weisJ my program just crashes after I go to one of the tabs where JList is used

@Ilolka1337
Copy link

@weisJ
Version: 2.4.3 SNAPSHOT

@weisJ
Copy link
Owner Author

weisJ commented Aug 8, 2020

Please create a separate issue with the necessary information.

@Ilolka1337
Copy link

@weisJ
I began to notice that the problem is not only in ComboBoxes, when I am in the program menu for a long time, the same thing happens, I minimize and re-deploy the program and a large number of copies disappear. How can I help you reproduce this problem?

@weisJ
Copy link
Owner Author

weisJ commented Aug 10, 2020

You can do the following thing:

  • Try out different monitors (if possible).
  • Try out different screen resolutions.
  • Try out different scaling factors.
  • Try out different versions of Java (Preferably fresh installations)
    • Also try with -Dsun.java2d.dpiaware=false and -Dsun.java2d.dpiaware=false.

To get a grasp on this issue its necessary to know what parameters cause it.

@Ilolka1337
Copy link

@weisJ
his problem is not displayed only in the usual laf
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
I also noticed in DarkLaf a very small Font, could you fix it a little later?

@Ilolka1337
Copy link

@weisJ

Try out different versions of Java (Preferably fresh installations)
Also try with -Dsun.java2d.dpiaware=false and -Dsun.java2d.dpiaware=true.

does not solve the problem

@Ilolka1337
Copy link

@weisJ
everything that you wrote above has been checked many times and it works as a solution to the problem, but I would not want to switch the screen resolution just because of one program

@weisJ
Copy link
Owner Author

weisJ commented Aug 10, 2020

I am not asking you to permanently change your screen resolution but to find out the threshold where the issue starts to appear and tell that to me.

@weisJ
Copy link
Owner Author

weisJ commented Aug 10, 2020

@weisJ

Try out different versions of Java (Preferably fresh installations)
Also try with -Dsun.java2d.dpiaware=false and -Dsun.java2d.dpiaware=true.

does not solve the problem

Which versions of java did you test it on?

@Ilolka1337
Copy link

@weisJ

Which versions of java did you test it on?

Java tested versions:
java 8 build 202
java 8 build 201

@weisJ
Copy link
Owner Author

weisJ commented Aug 10, 2020

From the readme

The LaF is compatible with Java >=1.8 (you need >=1.9 to get proper scaling).

Please try a java version >= Java 9

@Ilolka1337
Copy link

@weisJ

Please try a java version >= Java 9

but then I will have problems with other applications, they will appear hazy as if they were washed out with soap

@Ilolka1337
Copy link

@weisJ
if i test it there can you fix it for Java 8?

@weisJ
Copy link
Owner Author

weisJ commented Aug 10, 2020

This is absolutely not relevant to the issue. Again I am not asking you to stick with this setup but to tell be what setup works for you.

if i test it there can you fix it for Java 8?

I do not intent to support High dpi scaling on Java versions older than 9. What you are experiencing is probably a misconfigured java installation, where the DPI scaling mechanism for javaw.exe or java.exe isn't configured properly.

@Ilolka1337
Copy link

@weisJ

I do not intent to support High dpi scaling on Java versions older than 9. What you are experiencing is probably a misconfigured java installation, where the DPI scaling mechanism for javaw.exe or java.exe isn't configured properly.

I could see the correct operation of the program in Java 8 only when changing the screen parameters from 4k to 1920x1080

@Ilolka1337
Copy link

@weisJ
on Java 9 everything is stable could you solve this problem on Java 8?

@weisJ
Copy link
Owner Author

weisJ commented Aug 10, 2020

Just to clarify the situation:

  1. Find java.exe / javaw.exe (for Java 8)
  2. Right click -> Properties
  3. Go to Compatibility tab

How does this tab look for you?

on Java 9 everything is stable could you solve this problem on Java 8?

Well as I have said before I won't do any compatibility changes regarding high dpi issues for Java 8. The best I can do is disable the custom decorations if Java 8 is used.

@weisJ
Copy link
Owner Author

weisJ commented Aug 11, 2020

I also noticed in DarkLaf a very small Font, could you fix it a little later?

This is also caused by incorrect scaling and should be fixed by using Java 9. Though you can manually increase the font size with the following code:

ThemeSettings.getInstance().setFontSizeRule(FonSizeRule.fromPreset(FontSizePreset.Large)); // Or some other preset.

@Ilolka1337
Copy link

@weisJ
why don't you want to do at least screen resolution support for Java 8?

@weisJ
Copy link
Owner Author

weisJ commented Aug 12, 2020

I will still try to fix the issue for you but I can’t promise that this is something thats in may hand. The fact that it only happens with Java 8 indicates it may be a JDK specific bug.

You will still have to tell me the scaling/resolution thresholds where the issue appears. Also please answer my question regarding the compatibility settings if your Java installation (both 8 and 9).

@Ilolka1337
Copy link

@weisJ
I can't seem to edit the high resolution settings for a specific program, as for some reason I don't have permission to do this, although I have administrator rights

@weisJ
Copy link
Owner Author

weisJ commented Aug 12, 2020

Did you follow these steps?

Just to clarify the situation:

  1. Find java.exe / javaw.exe (for Java 8)
  2. Right click -> Properties
  3. Go to Compatibility tab

@Ilolka1337
Copy link

@weisJ

Did you follow these steps?

Yes

@GraxCode
Copy link

image
Manjaro Linux

@weisJ
Copy link
Owner Author

weisJ commented Mar 2, 2021

image
Manjaro Linux

@GraxCode
This looks like a slightly different problem to me. Rather than what is happening here, there seems to be a problem with the painting of the tooltip shadow. This may be caused by some weird alpha compatibility. What desktop environment are you using and does this issue occur every time?

@GraxCode
Copy link

I am on KDE-Plasma 5.20 (Framework 5.77). This always happens the first time hovering on something after starting the GUI. After the first hover, it doesn't occur anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed needs reproduction The issue can't be reproduced and needs a reproducible example. windows Related to the windows operating system
Projects
None yet
Development

No branches or pull requests

3 participants