mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-142106 Quick documentation popup always minimized
This commit is contained in:
+12
@@ -58,6 +58,7 @@ import com.intellij.ui.components.JBScrollPane;
|
||||
import com.intellij.util.Consumer;
|
||||
import com.intellij.util.containers.HashMap;
|
||||
import com.intellij.util.ui.GraphicsUtil;
|
||||
import com.intellij.util.ui.JBDimension;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -313,6 +314,17 @@ public class DocumentationComponent extends JPanel implements Disposable, DataPr
|
||||
public Dimension getPreferredSize() {
|
||||
Dimension editorPaneSize = myEditorPane.getPreferredScrollableViewportSize();
|
||||
Dimension controlPanelSize = myControlPanel.getPreferredSize();
|
||||
return getSize(editorPaneSize, controlPanelSize);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dimension getMinimumSize() {
|
||||
Dimension editorPaneSize = new JBDimension(20, 20);
|
||||
Dimension controlPanelSize = myControlPanel.getMinimumSize();
|
||||
return getSize(editorPaneSize, controlPanelSize);
|
||||
}
|
||||
|
||||
private Dimension getSize(Dimension editorPaneSize, Dimension controlPanelSize) {
|
||||
return new Dimension(Math.max(editorPaneSize.width, controlPanelSize.width), editorPaneSize.height + controlPanelSize.height);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user