mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
ScanPopup: Some more of save/restore position of the pinned popup window
This commit is contained in:
parent
74aa95220d
commit
e43c0d2521
11
scanpopup.cc
11
scanpopup.cc
|
@ -1074,6 +1074,14 @@ void ScanPopup::closeEvent( QCloseEvent * ev )
|
|||
QMainWindow::closeEvent( ev );
|
||||
}
|
||||
|
||||
void ScanPopup::moveEvent( QMoveEvent * ev )
|
||||
{
|
||||
if( isVisible() && ui.pinButton->isChecked() )
|
||||
pinnedGeometry = saveGeometry();
|
||||
|
||||
QMainWindow::moveEvent( ev );
|
||||
}
|
||||
|
||||
void ScanPopup::prefixMatchFinished()
|
||||
{
|
||||
// Check that there's a window there at all
|
||||
|
@ -1120,6 +1128,9 @@ void ScanPopup::pinButtonClicked( bool checked )
|
|||
}
|
||||
|
||||
show();
|
||||
|
||||
if( checked )
|
||||
pinnedGeometry = saveGeometry();
|
||||
}
|
||||
|
||||
void ScanPopup::focusTranslateLine()
|
||||
|
|
|
@ -180,6 +180,7 @@ private:
|
|||
virtual void enterEvent( QEvent * event );
|
||||
virtual void showEvent( QShowEvent * );
|
||||
virtual void closeEvent( QCloseEvent * );
|
||||
virtual void moveEvent( QMoveEvent * );
|
||||
|
||||
/// Returns inputWord, chopped with appended ... if it's too long/
|
||||
QString elideInputWord();
|
||||
|
|
Loading…
Reference in a new issue