Fix a logic error in bottom right hotspot

This commit is contained in:
ArsenArsen 2017-09-06 23:54:48 +02:00
parent 6120138523
commit 065c55f907
2 changed files with 2 additions and 2 deletions

View File

@ -254,7 +254,7 @@ void CropScene::mouseMoveEvent(QGraphicsSceneMouseEvent *e) {
if (qAbs(e->scenePos().y() - rect->rect().bottom()) < 10) {
close = true;
views()[0]->setCursor(Qt::SizeFDiagCursor);
if (e->buttons() & Qt::LeftButton && prevButtons != e->buttons()) newRect.setBottomLeft(cursorPos);
if (e->buttons() & Qt::LeftButton && prevButtons != e->buttons()) newRect.setBottomRight(cursorPos);
} else if (qAbs(e->scenePos().y() - rect->rect().top()) < 10) {
close = true;
views()[0]->setCursor(Qt::SizeBDiagCursor);

View File

@ -11,7 +11,7 @@ static QString hintPattern(ScreenAreaSelector::tr("Set the recording region by r
ScreenAreaSelector::ScreenAreaSelector() {
setAttribute(Qt::WA_TranslucentBackground);
setAttribute(Qt::WA_DeleteOnClose);
setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint);
setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint);
setStyleSheet("background-color: rgba(0, 0, 0, 0.5);");
setWindowTitle(tr("KShare: Select Area (By resizing this window)"));
setAutoFillBackground(true);