diff --git a/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/frame/MainFrame.java b/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/frame/MainFrame.java index 5105edf6ea7a..b4868d8c0814 100644 --- a/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/frame/MainFrame.java +++ b/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/frame/MainFrame.java @@ -104,15 +104,8 @@ public class MainFrame extends JPanel implements DataProvider, Disposable { myDetailsSplitter.setFirstComponent(setupScrolledGraph()); setupDetailsSplitter(uiProperties.isShowDetails()); - JComponent toolbars = new JPanel(new BorderLayout()); - toolbars.add(myToolbar, BorderLayout.NORTH); - toolbars.add(myBranchesPanel.getMainComponent(), BorderLayout.CENTER); - JComponent toolbarsAndTable = new JPanel(new BorderLayout()); - toolbarsAndTable.add(toolbars, BorderLayout.NORTH); - toolbarsAndTable.add(myDetailsSplitter, BorderLayout.CENTER); - ProgressStripe progressStripe = - new ProgressStripe(toolbarsAndTable, toolbars, this, ProgressWindow.DEFAULT_PROGRESS_DIALOG_POSTPONE_TIME_MILLIS) { + new ProgressStripe(myDetailsSplitter, this, ProgressWindow.DEFAULT_PROGRESS_DIALOG_POSTPONE_TIME_MILLIS) { @Override public void updateUI() { super.updateUI(); @@ -131,8 +124,16 @@ public class MainFrame extends JPanel implements DataProvider, Disposable { } }, this); + + JComponent toolbars = new JPanel(new BorderLayout()); + toolbars.add(myToolbar, BorderLayout.NORTH); + toolbars.add(myBranchesPanel.getMainComponent(), BorderLayout.CENTER); + JComponent toolbarsAndTable = new JPanel(new BorderLayout()); + toolbarsAndTable.add(toolbars, BorderLayout.NORTH); + toolbarsAndTable.add(progressStripe, BorderLayout.CENTER); + myChangesBrowserSplitter = new OnePixelSplitter(false, "vcs.log.changes.splitter.proportion", 0.7f); - myChangesBrowserSplitter.setFirstComponent(progressStripe); + myChangesBrowserSplitter.setFirstComponent(toolbarsAndTable); myChangesBrowserSplitter.setSecondComponent(myChangesLoadingPane); setLayout(new BorderLayout()); diff --git a/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/frame/ProgressStripe.java b/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/frame/ProgressStripe.java index 11edb00ebfbb..4dca06ae33e7 100644 --- a/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/frame/ProgressStripe.java +++ b/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/frame/ProgressStripe.java @@ -35,7 +35,7 @@ public class ProgressStripe extends JBPanel { private final NotNullComputable myCreateLoadingDecorator; protected MyLoadingDecorator myDecorator; - public ProgressStripe(@NotNull JComponent targetComponent, @NotNull JComponent toolbar, @NotNull Disposable parent, int startDelayMs) { + public ProgressStripe(@NotNull JComponent targetComponent, @NotNull Disposable parent, int startDelayMs) { super(new BorderLayout()); myPanel = new JBPanel(new BorderLayout()); myPanel.setOpaque(false); @@ -44,7 +44,7 @@ public class ProgressStripe extends JBPanel { myCreateLoadingDecorator = () -> { Disposable disposable = Disposer.newDisposable(); Disposer.register(parent, disposable); - return new MyLoadingDecorator(targetComponent, toolbar, myPanel, disposable, startDelayMs); + return new MyLoadingDecorator(targetComponent, myPanel, disposable, startDelayMs); }; createLoadingDecorator(); } @@ -82,36 +82,13 @@ public class ProgressStripe extends JBPanel { private static class MyLoadingDecorator extends LoadingDecorator { @NotNull private final Disposable myDisposable; - @NotNull - private final JComponent myToolbar; - @NotNull - private final ComponentAdapter myListener; - private Box.Filler myFiller; public MyLoadingDecorator(@NotNull JComponent component, - @NotNull JComponent toolbar, @NotNull JPanel contentPanel, @NotNull Disposable disposable, int startDelayMs) { super(contentPanel, disposable, startDelayMs, false, ProgressStripeIcon.generateIcon(component)); myDisposable = disposable; - myToolbar = toolbar; - myListener = new ComponentAdapter() { - @Override - public void componentResized(ComponentEvent e) { - super.componentResized(e); - adjustFiller(); - } - }; - myToolbar.addComponentListener(myListener); - adjustFiller(); - } - - private void adjustFiller() { - if (myFiller != null && myToolbar.getHeight() != 0) { - Dimension dimension = new Dimension(0, myToolbar.getHeight()); - myFiller.changeShape(dimension, dimension, dimension); - } } public void startLoadingImmediately() { @@ -124,8 +101,6 @@ public class ProgressStripe extends JBPanel { NonOpaquePanel result = new NonOpaquePanel(); result.setLayout(new BoxLayout(result, BoxLayout.Y_AXIS)); - myFiller = new Box.Filler(new Dimension(), new Dimension(), new Dimension()); - result.add(myFiller); result.add(icon); parent.add(result, BorderLayout.NORTH); @@ -134,7 +109,6 @@ public class ProgressStripe extends JBPanel { } public void dispose() { - myToolbar.removeComponentListener(myListener); Disposer.dispose(myDisposable); } }