mirror of
https://github.com/igniterealtime/Spark.git
synced 2026-03-18 13:35:57 +00:00
Dialog moved to top-right (in way that it doesn't cover top menu bar). (#317)
Fixed formatting. SPARK-939_Stretch_and_move_Find_dialog - moved to NORTHEAST
This commit is contained in:
@ -448,7 +448,7 @@ public class UserManager {
|
||||
|
||||
final JPanel mainPanel = new JPanel(new BorderLayout());
|
||||
mainPanel.setLayout(new GridBagLayout());
|
||||
mainPanel.add(layoutPanel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 200, 0));
|
||||
mainPanel.add(layoutPanel, new GridBagConstraints(0, 0, 1, 1, 0.5, 0.5, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(20, 1, 5, 1), 200, 0));
|
||||
mainPanel.setOpaque(false);
|
||||
|
||||
contactField.setText(contact);
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
package org.jivesoftware.spark.component;
|
||||
|
||||
import org.jivesoftware.resource.SparkRes;
|
||||
import org.jivesoftware.spark.SparkManager;
|
||||
import org.jivesoftware.spark.ui.ContactItem;
|
||||
import org.jivesoftware.spark.util.ModelUtil;
|
||||
|
||||
@ -176,7 +177,11 @@ public class JContactItemField extends JPanel {
|
||||
|
||||
if (validItems.size() != 0 && !popup.isVisible()) {
|
||||
popup.pack();
|
||||
popup.setSize(textField.getWidth(), 200);
|
||||
if(validItems.size()*16<=SparkManager.getMainWindow().getHeight()-SparkManager.getSearchManager().getSearchServiceUI().getHeight()-SparkManager.getMainWindow().getTopToolBar().getHeight()-SparkManager.getWorkspace().getStatusBar().getHeight()-48){
|
||||
popup.setSize(textField.getWidth(), validItems.size()*16+5);
|
||||
}else{
|
||||
popup.setSize(textField.getWidth(), SparkManager.getMainWindow().getHeight()-SparkManager.getSearchManager().getSearchServiceUI().getHeight()-SparkManager.getMainWindow().getTopToolBar().getHeight()-SparkManager.getWorkspace().getStatusBar().getHeight()-48);
|
||||
}
|
||||
Point pt = textField.getLocationOnScreen();
|
||||
pt.translate(0, textField.getHeight());
|
||||
popup.setLocation(pt);
|
||||
|
||||
Reference in New Issue
Block a user