mirror of
https://invent.kde.org/graphics/okular
synced 2024-10-28 19:28:38 +00:00
Take the margin into account in mouse{Press,Release}Event
svn path=/trunk/KDE/kdegraphics/okular/; revision=718756
This commit is contained in:
parent
44dd16d127
commit
d0fd4b6f26
1 changed files with 2 additions and 2 deletions
|
@ -582,7 +582,7 @@ void ThumbnailWidget::mousePressEvent( QMouseEvent * e )
|
|||
{
|
||||
QRect r = m_visibleRect.geometry( m_pixmapWidth, m_pixmapHeight );
|
||||
|
||||
if ( e->button() != Qt::RightButton && r.contains( e->pos() ) )
|
||||
if ( e->button() != Qt::RightButton && r.contains( e->pos() - QPoint( m_margin / 2, m_margin / 2 ) ) )
|
||||
{
|
||||
mouseGrabPos = e->pos();
|
||||
}
|
||||
|
@ -596,7 +596,7 @@ void ThumbnailWidget::mousePressEvent( QMouseEvent * e )
|
|||
void ThumbnailWidget::mouseReleaseEvent( QMouseEvent * e )
|
||||
{
|
||||
QRect r = m_visibleRect.geometry( m_pixmapWidth, m_pixmapHeight );
|
||||
if ( r.contains( e->pos() ) )
|
||||
if ( r.contains( e->pos() - QPoint( m_margin / 2, m_margin / 2 ) ) )
|
||||
{
|
||||
setCursor( Qt::OpenHandCursor );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue