Layout fixes for LocalePage + default location.

This commit is contained in:
Teo Mrnjavac 2014-07-02 18:12:20 +02:00
parent 1ac10b40e6
commit 87b009cc23
2 changed files with 14 additions and 4 deletions

View File

@ -31,7 +31,7 @@ CalamaresWindow::CalamaresWindow( QWidget* parent )
{
// Hide close button
setWindowFlags( Qt::Window | Qt::WindowTitleHint | Qt::CustomizeWindowHint );
setMinimumSize( 800, 600 );
setMinimumSize( 1010, 600 );
QBoxLayout* mainLayout = new QHBoxLayout;
setLayout( mainLayout );

View File

@ -29,12 +29,17 @@ LocalePage::LocalePage( QWidget* parent )
: QWidget()
, m_blockTzWidgetSet( false )
{
QBoxLayout *mainLayout = new QVBoxLayout;
QBoxLayout* mainLayout = new QVBoxLayout;
QBoxLayout* tzwLayout = new QHBoxLayout;
mainLayout->addLayout( tzwLayout );
m_tzWidget = new TimeZoneWidget( this );
mainLayout->addWidget( m_tzWidget );
tzwLayout->addStretch();
tzwLayout->addWidget( m_tzWidget );
tzwLayout->addStretch();
setMinimumWidth( m_tzWidget->width() );
QBoxLayout *bottomLayout = new QHBoxLayout;
QBoxLayout* bottomLayout = new QHBoxLayout;
mainLayout->addLayout( bottomLayout );
QLabel* cityLabel = new QLabel( tr( "Region:" ), this );
@ -137,5 +142,10 @@ LocalePage::init()
m_timezoneCombo->blockSignals( false );
m_regionCombo->currentIndexChanged( m_regionCombo->currentText() );
// Default location
// TODO: make configurable from module.conf
m_tzWidget->setCurrentLocation( "Europe", "Berlin" );
emit m_tzWidget->locationChanged( m_tzWidget->getCurrentLocation() );
}