|
|
|
@ -76,9 +76,6 @@ PresentationSearchBar::PresentationSearchBar( Okular::Document *document, QWidge |
|
|
|
m_anchor->installEventFilter( this ); |
|
|
|
m_anchor->installEventFilter( this ); |
|
|
|
|
|
|
|
|
|
|
|
connect( closeBtn, SIGNAL( clicked() ), this, SLOT( close() ) ); |
|
|
|
connect( closeBtn, SIGNAL( clicked() ), this, SLOT( close() ) ); |
|
|
|
|
|
|
|
|
|
|
|
// force the initial snap
|
|
|
|
|
|
|
|
forceSnap(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
PresentationSearchBar::~PresentationSearchBar() |
|
|
|
PresentationSearchBar::~PresentationSearchBar() |
|
|
|
@ -92,6 +89,13 @@ void PresentationSearchBar::forceSnap() |
|
|
|
move( m_point.x() - width() / 2, m_point.y() - height() ); |
|
|
|
move( m_point.x() - width() / 2, m_point.y() - height() ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void PresentationSearchBar::resizeEvent( QResizeEvent * ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// if in snap mode, then force the snap and place ourselves correctly again
|
|
|
|
|
|
|
|
if ( m_snapped ) |
|
|
|
|
|
|
|
forceSnap(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool PresentationSearchBar::eventFilter( QObject *obj, QEvent *e ) |
|
|
|
bool PresentationSearchBar::eventFilter( QObject *obj, QEvent *e ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if ( obj == m_handle && |
|
|
|
if ( obj == m_handle && |
|
|
|
|