mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-67256 QuickDoc: Quick doc component has a too small size when its shown at the very first time
Preferred size calculation was not configured for the JLayeredPane component recently added to the quick doc control
This commit is contained in:
+7
@@ -247,6 +247,13 @@ public class DocumentationComponent extends JPanel implements Disposable, DataPr
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dimension getPreferredSize() {
|
||||
Dimension editorPaneSize = myEditorPane.getPreferredScrollableViewportSize();
|
||||
Dimension controlPanelSize = myControlPanel.getPreferredSize();
|
||||
return new Dimension(Math.max(editorPaneSize.width, controlPanelSize.width), editorPaneSize.height + controlPanelSize.height);
|
||||
}
|
||||
};
|
||||
layeredPane.add(myScrollPane);
|
||||
layeredPane.setLayer(myScrollPane, 0);
|
||||
|
||||
Reference in New Issue
Block a user