diff --git a/limereport/items/lrabstractlayout.h b/limereport/items/lrabstractlayout.h index 2067559..742055a 100644 --- a/limereport/items/lrabstractlayout.h +++ b/limereport/items/lrabstractlayout.h @@ -34,7 +34,7 @@ public: int childrenCount(); int layoutSpacing() const; void setLayoutSpacing(int layoutSpacing); - + qreal layoutSpacingMM(){ return m_layoutSpacing * mmFactor();} protected: void beforeDelete(); void childAddedEvent(BaseDesignIntf *child); diff --git a/limereport/items/lrhorizontallayout.cpp b/limereport/items/lrhorizontallayout.cpp index 4e4ff3f..f4f51ef 100644 --- a/limereport/items/lrhorizontallayout.cpp +++ b/limereport/items/lrhorizontallayout.cpp @@ -159,7 +159,7 @@ void HorizontalLayout::updateLayoutSize() } if (h>0) setHeight(h+spaceBorder*2); if (layoutType() == Layout) - setWidth(w + layoutSpacing() * (visibleItemCount-1)); + setWidth(w + layoutSpacingMM() * (visibleItemCount-1)); else{ relocateChildren(); if (!isRelocating()){ @@ -183,7 +183,7 @@ void HorizontalLayout::relocateChildren() foreach (BaseDesignIntf* item, layoutsChildren()) { if (item->isVisible() || itemMode() == DesignMode){ item->setPos(curX,spaceBorder); - curX += item->width() + layoutSpacing(); + curX += item->width() + layoutSpacingMM(); item->setHeight(height()-(spaceBorder * 2)); } } @@ -203,7 +203,7 @@ void HorizontalLayout::divideSpace(){ } } - itemsSumSize += layoutSpacing() * (visibleItemsCount-1); + itemsSumSize += layoutSpacingMM() * (visibleItemsCount-1); if (itemMode() == DesignMode && !layoutsChildren().isEmpty()){ qreal delta = (width() - (itemsSumSize+spaceBorder*2)); diff --git a/limereport/items/lrverticallayout.cpp b/limereport/items/lrverticallayout.cpp index 2e658b1..65d75d9 100644 --- a/limereport/items/lrverticallayout.cpp +++ b/limereport/items/lrverticallayout.cpp @@ -51,7 +51,7 @@ void VerticalLayout::updateLayoutSize() } } if (w>0) setWidth(w+spaceBorder*2); - setHeight(h + layoutSpacing() *(visibleItemCount-1)); + setHeight(h + layoutSpacingMM() *(visibleItemCount-1)); } void VerticalLayout::relocateChildren() @@ -69,7 +69,7 @@ void VerticalLayout::relocateChildren() foreach (BaseDesignIntf* item, layoutsChildren()) { if (item->isVisible() || itemMode() == DesignMode){ item->setPos(spaceBorder, curY); - curY+=item->height() + layoutSpacing(); + curY+=item->height() + layoutSpacingMM(); item->setWidth(width() - (spaceBorder * 2)); } } @@ -163,7 +163,7 @@ void VerticalLayout::divideSpace() } } - itemsSumSize += layoutSpacing() * (visibleItemsCount - 1); + itemsSumSize += layoutSpacingMM() * (visibleItemsCount - 1); qreal delta = (height() - (itemsSumSize+spaceBorder*2)) / (visibleItemsCount!=0 ? visibleItemsCount : 1); for (int i=0; i