IDEA-151449 JBScrollPane adds 14px space at the bottom of my component.

This commit is contained in:
Sergey Malenkov
2016-02-09 23:09:09 +03:00
parent 3f6e79165f
commit 57e5cb5d5c
2 changed files with 2 additions and 14 deletions
@@ -323,14 +323,7 @@ public class JBViewport extends JViewport implements ZoomableViewport {
@Override
public void paintBorder(Component view, Graphics g, int x, int y, int width, int height) {
if (myBorder != null) {
if (view instanceof JComponent) {
Insets insets = new Insets(0, 0, 0, 0);
addViewInsets((JComponent)view, insets);
x += insets.left;
y += insets.top;
width -= insets.left + insets.right;
height -= insets.top + insets.bottom;
}
// additional insets are used inside a custom border
myBorder.paintBorder(view, g, x, y, width, height);
}
}
@@ -105,12 +105,7 @@ class DetailsPanel extends JPanel implements ListSelectionListener {
myReferencesPanel = new ReferencesPanel(myColorManager);
myCommitDetailsPanel = new DataPanel(logDataHolder.getProject(), logDataHolder.isMultiRoot(), logDataHolder);
myScrollPane = new JBScrollPane(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED) {
@Override
protected JViewport createViewport() {
return new JViewport();
}
};
myScrollPane = new JBScrollPane(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
myScrollPane.getVerticalScrollBar().setUnitIncrement(8);
myMainContentPanel = new JPanel(new MigLayout("flowy, ins 0, hidemode 3, gapy 0")) {
@Override