| 124 | |
| 125 | |
| 126 | void UBGraphicsCurtainItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
| 127 | { |
| 128 | QColor color = drawColor(); |
| 129 | painter->setCompositionMode(QPainter::CompositionMode_SourceOver); |
| 130 | if(widget == UBApplication::boardController->controlView()->viewport()) |
| 131 | { |
| 132 | color = UBSettings::paletteColor; |
| 133 | if(!UBApplication::displayManager->useMultiScreen() || !UBApplication::displayManager->hasDisplay()) |
| 134 | { |
| 135 | color = opaqueControlColor(); |
| 136 | } |
| 137 | } |
| 138 | |
| 139 | // Never draw the rubber band, we draw our custom selection with the DelegateFrame |
| 140 | QStyleOptionGraphicsItem styleOption = QStyleOptionGraphicsItem(*option); |
| 141 | styleOption.state &= ~QStyle::State_Selected; |
| 142 | |
| 143 | painter->fillRect(rect(), color); |
| 144 | Delegate()->postpaint(painter, option, widget); |
| 145 | } |
| 146 | |
| 147 | |
| 148 | UBItem* UBGraphicsCurtainItem::deepCopy() const |
nothing calls this directly
no test coverage detected