Adjust layout

This commit is contained in:
kaetemi 2015-03-06 19:06:10 +01:00
parent 9523abfe92
commit 0c1bba4540
2 changed files with 17 additions and 10 deletions

View file

@ -122,10 +122,13 @@ void CCrashReportWidget::setup( const std::vector< std::pair< std::string, std::
connect( cb, SIGNAL( stateChanged( int ) ), this, SLOT( onSendCBClicked() ) ); connect( cb, SIGNAL( stateChanged( int ) ), this, SLOT( onSendCBClicked() ) );
} }
hbl->addStretch();
QPushButton *alwaysIgnoreButton = new QPushButton( tr( "Always Ignore" ), this ); QPushButton *alwaysIgnoreButton = new QPushButton( tr( "Always Ignore" ), this );
QPushButton *ignoreButton = new QPushButton( tr( "Ignore" ), this ); QPushButton *ignoreButton = new QPushButton( tr( "Ignore" ), this );
QPushButton *abortButton = new QPushButton( tr( "Abort" ), this ); QPushButton *abortButton = new QPushButton( tr( "Abort" ), this );
QPushButton *breakButton = new QPushButton( tr( "Break" ), this ); QPushButton *breakButton = new QPushButton(tr("Break"), this);
breakButton->setAutoDefault(true);
hbl->addWidget( alwaysIgnoreButton ); hbl->addWidget( alwaysIgnoreButton );
hbl->addWidget( ignoreButton ); hbl->addWidget( ignoreButton );
@ -141,26 +144,30 @@ void CCrashReportWidget::setup( const std::vector< std::pair< std::string, std::
} }
else else
{ {
hbl->addStretch();
// If -host is specified, offer the send function // If -host is specified, offer the send function
if( !m_socket->url().isEmpty() && !m_fileName.isEmpty() ) if( !m_socket->url().isEmpty() && !m_fileName.isEmpty() )
{ {
if (!m_forceSend)
{
QPushButton *cancelButton = new QPushButton(tr("Don't send report"), this);
connect(cancelButton, SIGNAL(clicked(bool)), this, SLOT(onCancelClicked()));
hbl->addWidget(cancelButton);
}
QPushButton *sendButton = new QPushButton( tr( "Send report" ), this ); QPushButton *sendButton = new QPushButton( tr( "Send report" ), this );
sendButton->setAutoDefault(true);
connect( sendButton, SIGNAL( clicked( bool ) ), this, SLOT( onSendClicked() ) ); connect( sendButton, SIGNAL( clicked( bool ) ), this, SLOT( onSendClicked() ) );
hbl->addWidget( sendButton ); hbl->addWidget( sendButton );
if( !m_forceSend )
{
QPushButton *cancelButton = new QPushButton( tr( "Don't send report" ), this );
connect( cancelButton, SIGNAL( clicked( bool ) ), this, SLOT( onCancelClicked() ) );
hbl->addWidget( cancelButton );
}
} }
// Otherwise only offer exit // Otherwise only offer exit
else else
{ {
QPushButton *exitButton = new QPushButton( tr( "Exit" ), this ); QPushButton *exitButton = new QPushButton( tr( "Exit" ), this );
connect( exitButton, SIGNAL( clicked( bool ) ), this, SLOT( onCancelClicked() ) ); connect( exitButton, SIGNAL( clicked( bool ) ), this, SLOT( onCancelClicked() ) );
hbl->addWidget( exitButton ); hbl->addWidget(exitButton);
exitButton->setAutoDefault(true);
} }
m_ui.gridLayout->addLayout( hbl, 6, 0, 1, 3 ); m_ui.gridLayout->addLayout( hbl, 6, 0, 1, 3 );

View file

@ -14,7 +14,7 @@
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>NeL Error Report</string> <string>NeL report</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="2"> <item row="0" column="0" colspan="2">