mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
diff: fix title layout with multiple notifications
ex: one editor - with two notifications, another - with one notification
This commit is contained in:
@@ -479,10 +479,10 @@ public class DiffUtil {
|
||||
List<JComponent> notifications = getCustomNotifications(content);
|
||||
if (notifications.isEmpty()) return title;
|
||||
|
||||
List<JComponent> 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
|
||||
|
||||
Reference in New Issue
Block a user