mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
resize problems
This commit is contained in:
@@ -142,6 +142,7 @@ public abstract class DialogWrapper {
|
||||
};
|
||||
private List<JBOptionButton> myOptionsButtons = new ArrayList<JBOptionButton>();
|
||||
private int myCurrentOptionsButtonIndex = -1;
|
||||
private boolean myResizeInProgress = false;
|
||||
|
||||
protected String getDoNotShowMessage() {
|
||||
return CommonBundle.message("dialog.options.do.not.show");
|
||||
@@ -167,6 +168,14 @@ public abstract class DialogWrapper {
|
||||
*/
|
||||
protected DialogWrapper(Project project, boolean canBeParent) {
|
||||
myPeer = createPeer(project, canBeParent);
|
||||
myPeer.getWindow().addComponentListener(new ComponentAdapter() {
|
||||
@Override
|
||||
public void componentResized(ComponentEvent e) {
|
||||
if (!myResizeInProgress) {
|
||||
myActualSize = myPeer.getSize();
|
||||
}
|
||||
}
|
||||
});
|
||||
createDefaultActions();
|
||||
}
|
||||
|
||||
@@ -1611,8 +1620,10 @@ public abstract class DialogWrapper {
|
||||
|
||||
private void resizeWithAnimation(final Dimension size) {
|
||||
//todo[kb]: fix this PITA
|
||||
myResizeInProgress = true;
|
||||
if (!Registry.is("enable.animation.on.dialogs")) {
|
||||
setSize(size.width, size.height);
|
||||
myResizeInProgress = false;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1637,6 +1648,7 @@ public abstract class DialogWrapper {
|
||||
if (myErrorText.shouldBeVisible()) {
|
||||
myErrorText.setVisible(true);
|
||||
}
|
||||
myResizeInProgress = false;
|
||||
}
|
||||
}.start();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user