From b4e905df62866ca351dbd417f84cb290c889cb08 Mon Sep 17 00:00:00 2001 From: Sergey Savenko Date: Wed, 24 Dec 2014 17:45:14 +0300 Subject: [PATCH] DBE-1035: fix JBTable not using column margin when expanding/collapsing columns --- platform/platform-api/src/com/intellij/ui/table/JBTable.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/platform-api/src/com/intellij/ui/table/JBTable.java b/platform/platform-api/src/com/intellij/ui/table/JBTable.java index 919317277b8a..9b6201ecf345 100644 --- a/platform/platform-api/src/com/intellij/ui/table/JBTable.java +++ b/platform/platform-api/src/com/intellij/ui/table/JBTable.java @@ -741,7 +741,8 @@ public class JBTable extends JTable implements ComponentWithEmptyText, Component TableColumn column = getColumnModel().getColumn(columnToPack); int currentWidth = column.getWidth(); int expandedWidth = getExpandedColumnWidth(columnToPack); - int newWidth = currentWidth >= expandedWidth ? getPreferredHeaderWidth(columnToPack) : expandedWidth; + int newWidth = getColumnModel().getColumnMargin() + + (currentWidth >= expandedWidth ? getPreferredHeaderWidth(columnToPack) : expandedWidth); setResizingColumn(column); column.setWidth(newWidth);