Vcard popup not showing when contact window is maximized
If width Spark Main Windows > width 0.9*screenSize we should put a window inside
package org.jivesoftware.spark.ui;
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.Insets;
-import java.awt.Point;
-import java.awt.Toolkit;
+import java.awt.*;
import java.awt.event.MouseEvent;
+
import java.net.MalformedURLException;
import java.net.URL;
@@ -42,7 +36,6 @@ import org.jivesoftware.smackx.vcardtemp.packet.VCard;
import org.jivesoftware.smackx.iqlast.packet.LastActivity;
import org.jivesoftware.smackx.iqlast.LastActivityManager;
import org.jivesoftware.spark.SparkManager;
-import org.jivesoftware.spark.ui.ContactItem;
import org.jivesoftware.spark.util.GraphicUtils;
import org.jivesoftware.spark.util.ModelUtil;
import org.jivesoftware.spark.util.log.Log;
@@ -216,6 +209,10 @@ public class ContactInfoWindow extends JPanel {
if (actualY + getHeight() > screenSize.height - 64) {
actualY -= actualY + getHeight() - screenSize.height + 64;
}
+ // if width Spark Main Windows > width 0.9*screenSize we should put a window inside
+ if(SparkManager.getMainWindow().getWidth() > screenSize.getWidth()*0.9){
+ actualX = x-310;
+ }
window.setLocation(actualX, actualY);
}
