mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2024-12-24 12:34:39 +03:00
"Transparent" menu item has been added to TextItem context menu
This commit is contained in:
parent
242dbe75d2
commit
b963428f4c
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user