From 5cec1d3638816dac40e2cc43a8b577826a1b0f19 Mon Sep 17 00:00:00 2001 From: peter Date: Mon, 2 Jul 2012 12:06:21 +0200 Subject: [PATCH] IDEA-88057 Completion popup: fix progress wheel position --- .../com/intellij/codeInsight/lookup/impl/LookupImpl.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupImpl.java b/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupImpl.java index 70bd5d7e91cd..0083f5c5d888 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupImpl.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupImpl.java @@ -1396,14 +1396,15 @@ public class LookupImpl extends LightweightHint implements LookupEx, Disposable myScrollBarIncreaseButton.setPreferredSize(buttonSize); myScrollBarIncreaseButton.setMinimumSize(buttonSize); myScrollBarIncreaseButton.setMaximumSize(buttonSize); - myScrollPane.getVerticalScrollBar().revalidate(); - myScrollPane.getVerticalScrollBar().repaint(); + JScrollBar scrollBar = myScrollPane.getVerticalScrollBar(); + scrollBar.revalidate(); + scrollBar.repaint(); final Dimension iconSize = myProcessIcon.getPreferredSize(); - myIconPanel.setBounds(getWidth() - iconSize.width, 0, iconSize.width, iconSize.height); + myIconPanel.setBounds(getWidth() - iconSize.width - (scrollBar.isVisible() ? scrollBar.getWidth() : 0), 0, iconSize.width, iconSize.height); final Dimension sortSize = mySortingLabel.getPreferredSize(); - final Point sbLocation = SwingUtilities.convertPoint(myScrollPane.getVerticalScrollBar(), 0, 0, myLayeredPane); + final Point sbLocation = SwingUtilities.convertPoint(scrollBar, 0, 0, myLayeredPane); final int sortHeight = Math.max(adHeight, mySortingLabel.getPreferredSize().height); mySortingLabel.setBounds(sbLocation.x, getHeight() - sortHeight, sortSize.width, sortHeight);