mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-12-05 00:24:06 +00:00
Merge remote-tracking branch 'origin/staged' into dev
This commit is contained in:
commit
920b0e1c4b
|
@ -233,12 +233,12 @@ MainWindow::MainWindow( Config::Class & cfg_ ):
|
|||
|
||||
// translate box
|
||||
groupListInToolbar = new GroupComboBox( navToolbar );
|
||||
groupListInToolbar->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred );
|
||||
groupListInToolbar->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::MinimumExpanding );
|
||||
groupListInToolbar->setSizeAdjustPolicy( QComboBox::AdjustToContents );
|
||||
translateBoxLayout->addWidget( groupListInToolbar );
|
||||
|
||||
translateBox = new TranslateBox( navToolbar );
|
||||
translateBox->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Fixed );
|
||||
translateBox->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding );
|
||||
translateBoxLayout->addWidget( translateBox );
|
||||
translateBoxToolBarAction = navToolbar->addWidget( translateBoxWidget );
|
||||
|
||||
|
@ -2591,12 +2591,6 @@ bool MainWindow::eventFilter( QObject * obj, QEvent * ev )
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( ev->type() == QEvent::Resize ) {
|
||||
QResizeEvent * resizeEvent = static_cast< QResizeEvent * >( ev );
|
||||
groupList->setFixedHeight( resizeEvent->size().height() );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if ( obj == ui.wordList ) {
|
||||
if ( ev->type() == QEvent::KeyPress ) {
|
||||
|
|
|
@ -101,6 +101,8 @@ void TranslateBox::setModel( QStringList & _words )
|
|||
|
||||
model->setStringList( _words );
|
||||
|
||||
completer->popup()->scrollToTop();
|
||||
|
||||
connect( completer,
|
||||
QOverload< const QString & >::of( &QCompleter::activated ),
|
||||
translate_line,
|
||||
|
|
Loading…
Reference in a new issue