0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-10-02 03:53:19 +03:00

Default band's background filling mode changed to transparent

This commit is contained in:
Arin Alexander
2019-03-01 17:32:48 +03:00
parent 1bb6fc8f5a
commit ed28faf784
4 changed files with 22 additions and 5 deletions

View File

@@ -82,7 +82,8 @@ BaseDesignIntf::BaseDesignIntf(const QString &storageTypeName, QObject *owner, Q
m_watermark(false),
m_hovered(false),
m_joinMarkerOn(false),
m_selectionMarker(0)
m_selectionMarker(0),
m_fillTransparentInDesignMode(true)
{
setGeometry(QRectF(0, 0, m_width, m_height));
if (BaseDesignIntf *item = dynamic_cast<BaseDesignIntf *>(parent)) {
@@ -430,7 +431,7 @@ void BaseDesignIntf::prepareRect(QPainter *painter, const QStyleOptionGraphicsIt
qreal o = (itemMode() & DesignMode) ? 0.5 : qreal(m_opacity) / 100;
painter->setOpacity(o);
painter->fillRect(r, brush);
} else if (itemMode() & DesignMode){
} else if ((itemMode() & DesignMode) && fillTransparentInDesignMode()){
painter->setOpacity(0.1);
painter->fillRect(r, QBrush(QPixmap(":/report/images/empty")));
}
@@ -721,6 +722,16 @@ void BaseDesignIntf::updatePossibleDirectionFlags(){
}
}
bool BaseDesignIntf::fillTransparentInDesignMode() const
{
return m_fillTransparentInDesignMode;
}
void BaseDesignIntf::setFillTransparentInDesignMode(bool fillTransparentInDesignMode)
{
m_fillTransparentInDesignMode = fillTransparentInDesignMode;
}
bool BaseDesignIntf::fillInSecondPass() const
{
return m_fillInSecondPass;