darklaf icon indicating copy to clipboard operation
darklaf copied to clipboard

[Windows] Paint bleeding when opening popups

Open weisJ opened this issue 4 years ago • 51 comments

@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 https://github.com/weisJ/darklaf/issues/162#issuecomment-633818904

weisJ avatar May 27 '20 11:05 weisJ

@weisJ when will this problem be solved?

Ilolka1337 avatar Jun 02 '20 16:06 Ilolka1337

@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 avatar Jun 02 '20 17:06 weisJ

@weisJ 2.2.1-SNAP | tests https://mega.nz/file/2vIixKKD#x4uhS7S8aQg1NTx7TGLNGUL_aoPOVlIRYC5VPa8I0OQ

Ilolka1337 avatar Jun 05 '20 05:06 Ilolka1337

Are you building with the newest native binaries?

weisJ avatar Jun 05 '20 07:06 weisJ

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

Ilolka1337 avatar Jun 07 '20 06:06 Ilolka1337

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%?

weisJ avatar Jun 07 '20 21:06 weisJ

@weisJ video https://mega.nz/file/z7pFGDZB#dvlONVPJnaeTiPiaBh2PvKnj9nFwBpBtKPTKTY8b7ws

Ilolka1337 avatar Jun 08 '20 08:06 Ilolka1337

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

weisJ avatar Jun 08 '20 08:06 weisJ

@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 avatar Jun 08 '20 08:06 Ilolka1337

@weisJ what was the problem really?

Ilolka1337 avatar Jun 08 '20 08:06 Ilolka1337

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?

weisJ avatar Jun 08 '20 09:06 weisJ

@weisJ only works if I set true in this parameter

Ilolka1337 avatar Jun 08 '20 09:06 Ilolka1337

image

Ilolka1337 avatar Jun 08 '20 09:06 Ilolka1337

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

Ilolka1337 avatar Jun 08 '20 10:06 Ilolka1337

@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.

weisJ avatar Jun 08 '20 10:06 weisJ

@weisJ https://mega.nz/file/nn4hCI6Y#JnjvjNHAUv34u1gc9SZhQlTyNxw4YPPeybJpsbjchJw

Ilolka1337 avatar Jun 08 '20 10:06 Ilolka1337

@weisJ in new updates the same problems again

Ilolka1337 avatar Jul 11 '20 14:07 Ilolka1337

@weisJ only now it is not fixed using JPopupMenu

Ilolka1337 avatar Jul 11 '20 14:07 Ilolka1337

@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?

weisJ avatar Jul 11 '20 14:07 weisJ

@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);

Ilolka1337 avatar Jul 11 '20 16:07 Ilolka1337

@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.

weisJ avatar Jul 11 '20 22:07 weisJ

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

Ilolka1337 avatar Jul 21 '20 19:07 Ilolka1337

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.

weisJ avatar Jul 22 '20 11:07 weisJ

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

Ilolka1337 avatar Jul 23 '20 10:07 Ilolka1337

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

Ilolka1337 avatar Aug 08 '20 10:08 Ilolka1337

@weisJ Version: 2.4.3 SNAPSHOT

Ilolka1337 avatar Aug 08 '20 10:08 Ilolka1337

Please create a separate issue with the necessary information.

weisJ avatar Aug 08 '20 12:08 weisJ

@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?

Ilolka1337 avatar Aug 10 '20 13:08 Ilolka1337

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.

weisJ avatar Aug 10 '20 13:08 weisJ

@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 avatar Aug 10 '20 14:08 Ilolka1337