diff --git a/src/item/itemdelegate.cpp b/src/item/itemdelegate.cpp
index 50fe29abe990d03c434e508846e9be1e7d7bc254..2f35d3a92c7c416ec30cc354ff5e047fb71137f5 100644
--- a/src/item/itemdelegate.cpp
+++ b/src/item/itemdelegate.cpp
@@ -209,7 +209,7 @@ void ItemDelegate::setItemSizes(QSize size, int idealWidth)
 {
     const auto margins = m_sharedData->theme.margins();
     const auto rowNumberSize = m_sharedData->theme.rowNumberSize();
-    const int margin = 2 * margins.width() + rowNumberSize.width() + m_view->spacing();
+    const int margin = 2 * margins.width() + rowNumberSize.width() + 2 * m_view->spacing();
     m_maxSize.setWidth(size.width() - margin);
     m_idealWidth = idealWidth - margin;