Drop shadows on Windows: fix location of light weight popup in case it has left or top drop shadow (issue #94)

This commit is contained in:
Karl Tauber
2020-05-14 11:44:00 +02:00
parent bf0ffc6ac2
commit a4d7f278cf

View File

@@ -214,6 +214,13 @@ public class FlatPopupFactory
dropShadowDelegate.show();
delegate.show();
// fix location of light weight popup in case it has left or top drop shadow
if( lightComp != null ) {
Insets insets = lightComp.getInsets();
if( insets.left != 0 || insets.top != 0 )
lightComp.setLocation( lightComp.getX() - insets.left, lightComp.getY() - insets.top );
}
}
@Override