Change mouse cursor when changing the current tool

Update the cursors when changing the current mode. Addresses the problems in the bug report.

- Use a opened/closed hand for browsing.
- Use cross for selection.

BUG: 271816
REVIEW: 102221
remotes/origin/textfind-and-transparency
Aleix Pol 15 years ago
parent 39fc2a471e
commit 390bf78ecc
  1. 8
      ui/pageview.cpp

@ -1520,7 +1520,7 @@ void PageView::mouseMoveEvent( QMouseEvent * e )
// drag page
else if ( !d->mouseGrabPos.isNull() )
{
setCursor( Qt::SizeAllCursor );
setCursor( Qt::ClosedHandCursor );
QPoint mousePos = e->globalPos();
QPoint delta = d->mouseGrabPos - mousePos;
@ -2838,6 +2838,8 @@ void PageView::updateCursor( const QPoint &p )
// if over a ObjectRect (of type Link) change cursor to hand
if ( d->mouseMode == MouseTextSelect )
setCursor( Qt::IBeamCursor );
else if ( d->mouseMode == MouseSelect )
setCursor( Qt::CrossCursor );
else if ( d->mouseAnn )
setCursor( Qt::ClosedHandCursor );
else
@ -2858,6 +2860,10 @@ void PageView::updateCursor( const QPoint &p )
{
setCursor( Qt::OpenHandCursor );
}
else if ( d->mouseMode == MouseNormal )
{
setCursor( Qt::OpenHandCursor );
}
else
{
setCursor( Qt::ArrowCursor );

Loading…
Cancel
Save