mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix extra border
This commit is contained in:
+19
-13
@@ -196,6 +196,11 @@ public class NavBarRootPaneExtension extends IdeRootPaneNorthExtension {
|
||||
}
|
||||
|
||||
private JComponent buildNavBarPanel() {
|
||||
myNavigationBar = new NavBarPanel(myProject, true);
|
||||
myWrapperPanel.putClientProperty("NavBarPanel", myNavigationBar);
|
||||
myNavigationBar.getModel().setFixedComponent(true);
|
||||
myScrollPane = ScrollPaneFactory.createScrollPane(myNavigationBar);
|
||||
|
||||
JPanel panel = new JPanel(new BorderLayout()) {
|
||||
|
||||
@Override
|
||||
@@ -232,22 +237,23 @@ public class NavBarRootPaneExtension extends IdeRootPaneNorthExtension {
|
||||
navBar.setBounds(x, (r.height - preferredSize.height) / 2,
|
||||
r.width - insets.left - insets.right, preferredSize.height);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateUI() {
|
||||
super.updateUI();
|
||||
myScrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
|
||||
myScrollPane.setHorizontalScrollBar(null);
|
||||
myScrollPane.setBorder(new NavBarBorder(true, 0));
|
||||
myScrollPane.setOpaque(false);
|
||||
myScrollPane.getViewport().setOpaque(false);
|
||||
myScrollPane.setViewportBorder(null);
|
||||
setOpaque(true);
|
||||
myNavigationBar.setBorder(null);
|
||||
}
|
||||
};
|
||||
|
||||
myNavigationBar = new NavBarPanel(myProject, true);
|
||||
myWrapperPanel.putClientProperty("NavBarPanel", myNavigationBar);
|
||||
myNavigationBar.getModel().setFixedComponent(true);
|
||||
|
||||
myScrollPane = ScrollPaneFactory.createScrollPane(myNavigationBar);
|
||||
myScrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
|
||||
myScrollPane.setHorizontalScrollBar(null);
|
||||
myScrollPane.setBorder(new NavBarBorder(true, 0));
|
||||
myScrollPane.setOpaque(false);
|
||||
myScrollPane.getViewport().setOpaque(false);
|
||||
panel.setOpaque(true);
|
||||
myNavigationBar.setBorder(null);
|
||||
panel.add(myScrollPane, BorderLayout.CENTER);
|
||||
|
||||
panel.updateUI();
|
||||
return panel;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user