* ohmeschwanzenneger: adjust button layout a bit; allow pressing enter to trigger downloading stuff

This commit is contained in:
giantpune 2011-05-29 00:31:24 +00:00
parent 92faf689ee
commit eeb3feb955
2 changed files with 48 additions and 33 deletions

View File

@ -35,11 +35,11 @@ MainWindow::MainWindow( QWidget *parent ) : QMainWindow( parent ), ui( new Ui::M
max = MAX( max, fm.width( ui->pushButton_initNand->text() ) );
max = MAX( max, fm.width( ui->pushButton_nandPath->text() ) );
max += 15;
ui->pushButton_CachePathBrowse->setMinimumWidth( max );
ui->pushButton_GetTitle->setMinimumWidth( max );
ui->pushButton_initNand->setMinimumWidth( max );
ui->pushButton_nandPath->setMinimumWidth( max );
max += 20;
ui->pushButton_CachePathBrowse->setFixedWidth( max );
ui->pushButton_GetTitle->setFixedWidth( max );
ui->pushButton_initNand->setFixedWidth( max );
ui->pushButton_nandPath->setFixedWidth( max );
Wad::SetGlobalCert( QByteArray( (const char*)&certs_dat, CERTS_DAT_SIZE ) );
@ -1032,3 +1032,16 @@ void MainWindow::on_actionFormat_triggered()
WriteTestLog();
ShowMessage( "Done!" );
}
// respond to keyboard events
void MainWindow::keyPressEvent( QKeyEvent *event )
{
if( event->key() == Qt::Key_Return )
{
on_pushButton_GetTitle_clicked();
event->accept();
return;
}
event->ignore();
}

View File

@ -55,6 +55,8 @@ private:
QByteArray GenMeta( const QString &desc, quint64 tid, quint16 version );
void WriteTestLog();
protected:
void keyPressEvent( QKeyEvent* event );
public slots:
//slots for getting info from the NUS downloader