mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2024-12-25 04:54:40 +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->setCheckable(true);
|
||||||
action->setChecked(stretchToMaxHeight());
|
action->setChecked(stretchToMaxHeight());
|
||||||
|
|
||||||
|
action = menu.addAction(tr("Transparent"));
|
||||||
|
action->setCheckable(true);
|
||||||
|
action->setChecked(backgroundMode() == TransparentMode);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextItem::processPopUpAction(QAction *action)
|
void TextItem::processPopUpAction(QAction *action)
|
||||||
@ -124,6 +128,13 @@ void TextItem::processPopUpAction(QAction *action)
|
|||||||
if (action->text().compare(tr("Stretch to max height")) == 0){
|
if (action->text().compare(tr("Stretch to max height")) == 0){
|
||||||
setProperty("stretchToMaxHeight",action->isChecked());
|
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) {
|
void TextItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* style, QWidget* widget) {
|
||||||
|
Loading…
Reference in New Issue
Block a user