mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IJPL-164294 vcs marker: Fix scrolling and positioning of popup
IJ-MR-147690 GitOrigin-RevId: 20a8d077f497d0bcb58a46d9ba30f525b1af897a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f01b1e9813
commit
97d32070e4
@@ -141,9 +141,14 @@ public class LineStatusMarkerPopupPanel extends JPanel {
|
||||
// Space for horizontal scrollbar
|
||||
size.height += JBUI.scale(20);
|
||||
}
|
||||
if (size.height > maxSize.height) {
|
||||
size.height = maxSize.height;
|
||||
|
||||
Rectangle panelRect = new Rectangle(new Point(0, 0), size);
|
||||
Rectangle rectangle = SwingUtilities.convertRectangle(this, panelRect, window);
|
||||
|
||||
if (rectangle.y + size.height > maxSize.height) {
|
||||
size.height = maxSize.height - rectangle.y;
|
||||
}
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
|
||||
@@ -76,9 +76,7 @@ internal class LineStatusMarkerPopupService {
|
||||
}
|
||||
|
||||
private fun showHint(hint: LightweightHint, editor: Editor, point: Point) {
|
||||
val parent = editor.getComponent().rootPane
|
||||
val hintHint = HintHint(editor, point)
|
||||
hint.show(parent, point.x, point.y, editor.getComponent(), hintHint)
|
||||
HintManagerImpl.doShowInGivenLocation(hint, editor, point, HintHint(editor, point), true)
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
@@ -213,7 +213,8 @@ public class HintManagerImpl extends HintManager {
|
||||
ClientHintManager.getCurrentInstance().showHint(component, p, flags, timeout, onHintHidden);
|
||||
}
|
||||
|
||||
static void doShowInGivenLocation(final LightweightHint hint, final Editor editor, Point p, HintHint hintInfo, boolean updateSize) {
|
||||
@ApiStatus.Internal
|
||||
public static void doShowInGivenLocation(final LightweightHint hint, final Editor editor, Point p, HintHint hintInfo, boolean updateSize) {
|
||||
if (ApplicationManager.getApplication().isUnitTestMode()) return;
|
||||
|
||||
JComponent externalComponent = getExternalComponent(editor);
|
||||
|
||||
Reference in New Issue
Block a user