mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2025-10-02 03:53:21 +03:00
Layout spacing property has been added to layouts
This commit is contained in:
@@ -4,7 +4,7 @@ namespace LimeReport {
|
||||
|
||||
AbstractLayout::AbstractLayout(QString xmlTag, QObject* owner, QGraphicsItem* parent)
|
||||
: LayoutDesignIntf(xmlTag, owner, parent), m_isRelocating(false), m_layoutType(Layout),
|
||||
m_hideEmptyItems(false)
|
||||
m_hideEmptyItems(false), m_layoutSpacing(0)
|
||||
{
|
||||
setPossibleResizeDirectionFlags(AllDirections);
|
||||
m_layoutMarker = new LayoutMarker(this);
|
||||
@@ -336,6 +336,22 @@ void AbstractLayout::slotOnChildSelectionHasChanged(BaseDesignIntf* item, bool v
|
||||
item->setZValue(value ? item->zValue()+1 : item->zValue()-1);
|
||||
}
|
||||
|
||||
int AbstractLayout::layoutSpacing() const
|
||||
{
|
||||
return m_layoutSpacing;
|
||||
}
|
||||
|
||||
void AbstractLayout::setLayoutSpacing(int layoutSpacing)
|
||||
{
|
||||
if (m_layoutSpacing != layoutSpacing){
|
||||
int oldValue = m_layoutSpacing;
|
||||
m_layoutSpacing = layoutSpacing;
|
||||
int delta = (m_layoutSpacing - oldValue) * (m_children.count()-1);
|
||||
notify("layoutSpacing", oldValue, m_layoutSpacing);
|
||||
setWidth(width() + delta);
|
||||
}
|
||||
}
|
||||
|
||||
bool AbstractLayout::hideEmptyItems() const
|
||||
{
|
||||
return m_hideEmptyItems;
|
||||
|
Reference in New Issue
Block a user