diff --git a/limereport/items/lrtextitem.cpp b/limereport/items/lrtextitem.cpp index e36d251..b2115bf 100644 --- a/limereport/items/lrtextitem.cpp +++ b/limereport/items/lrtextitem.cpp @@ -105,6 +105,10 @@ void TextItem::preparePopUpMenu(QMenu &menu) action->setCheckable(true); action->setChecked(stretchToMaxHeight()); + action = menu.addAction(tr("Transparent")); + action->setCheckable(true); + action->setChecked(backgroundMode() == TransparentMode); + } void TextItem::processPopUpAction(QAction *action) @@ -124,6 +128,13 @@ void TextItem::processPopUpAction(QAction *action) if (action->text().compare(tr("Stretch to max height")) == 0){ setProperty("stretchToMaxHeight",action->isChecked()); } + if (action->text().compare(tr("Transparent")) == 0){ + if (action->isChecked()){ + setProperty("backgroundMode",TransparentMode); + } else { + setProperty("backgroundMode",OpaqueMode); + } + } } void TextItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* style, QWidget* widget) {