|
|
@ -85,7 +85,7 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent, UB |
|
|
|
#ifdef Q_OS_OSX |
|
|
|
#ifdef Q_OS_OSX |
|
|
|
mTransparentDrawingView->setAttribute(Qt::WA_MacNoShadow, true); |
|
|
|
mTransparentDrawingView->setAttribute(Qt::WA_MacNoShadow, true); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
mTransparentDrawingView->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::Window | Qt::NoDropShadowWindowHint); |
|
|
|
mTransparentDrawingView->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::Window | Qt::NoDropShadowWindowHint | Qt::X11BypassWindowManagerHint); |
|
|
|
mTransparentDrawingView->setCacheMode(QGraphicsView::CacheNone); |
|
|
|
mTransparentDrawingView->setCacheMode(QGraphicsView::CacheNone); |
|
|
|
mTransparentDrawingView->resize(UBApplication::desktop()->width(), UBApplication::desktop()->height()); |
|
|
|
mTransparentDrawingView->resize(UBApplication::desktop()->width(), UBApplication::desktop()->height()); |
|
|
|
|
|
|
|
|
|
|
@ -948,9 +948,20 @@ void UBDesktopAnnotationController::updateMask(bool bTransparent) |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
// Remove the mask
|
|
|
|
mMask = QPixmap(mTransparentDrawingView->width(), mTransparentDrawingView->height()); |
|
|
|
QPixmap noMask(mTransparentDrawingView->width(), mTransparentDrawingView->height()); |
|
|
|
mMask.fill(Qt::transparent); |
|
|
|
mTransparentDrawingView->setMask(noMask.mask()); |
|
|
|
|
|
|
|
|
|
|
|
QPainter p; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
p.begin(&mMask); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
p.setPen(Qt::red); |
|
|
|
|
|
|
|
p.setBrush(QBrush(Qt::red)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
p.drawRect(mTransparentDrawingView->geometry().x(), mTransparentDrawingView->geometry().y(), mTransparentDrawingView->width(), mTransparentDrawingView->height()); |
|
|
|
|
|
|
|
p.end(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mTransparentDrawingView->setMask(mMask.mask()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|