From 67373b80c4b4a047b95d38bdc15e255efea0dbed Mon Sep 17 00:00:00 2001 From: Aleksey Pivovarov Date: Wed, 16 Aug 2017 15:48:20 +0300 Subject: [PATCH] diff: fix title layout with multiple notifications ex: one editor - with two notifications, another - with one notification --- .../diff-impl/src/com/intellij/diff/util/DiffUtil.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/diff-impl/src/com/intellij/diff/util/DiffUtil.java b/platform/diff-impl/src/com/intellij/diff/util/DiffUtil.java index d51d480c8c8e..243a8cacec87 100644 --- a/platform/diff-impl/src/com/intellij/diff/util/DiffUtil.java +++ b/platform/diff-impl/src/com/intellij/diff/util/DiffUtil.java @@ -479,10 +479,10 @@ public class DiffUtil { List notifications = getCustomNotifications(content); if (notifications.isEmpty()) return title; - List components = new ArrayList<>(); - if (title != null) components.add(title); - components.addAll(notifications); - return createStackedComponents(components, TITLE_GAP); + JPanel panel = new JPanel(new BorderLayout(0, TITLE_GAP)); + if (title != null) panel.add(title, BorderLayout.NORTH); + panel.add(createStackedComponents(notifications, TITLE_GAP), BorderLayout.SOUTH); + return panel; } @Nullable