Skip to content

Commit

Permalink
Dock widget ui fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Mar 12, 2020
1 parent e6f285b commit 835f928
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/gui/qgstemporalcontrollerdockwidget.cpp
Expand Up @@ -123,9 +123,9 @@ void QgsTemporalControllerDockWidget::updateSlider( const QgsDateTimeRange &rang
void QgsTemporalControllerDockWidget::updateRangeLabel( const QgsDateTimeRange &range )
{
QLocale locale;
mCurrentRangeLabel->setText( tr( "Current temporal range is from %1 to %2" ).arg(
range.begin().toString( locale.dateTimeFormat() ),
range.end().toString( locale.dateTimeFormat() ) ) );
mCurrentRangeLabel->setText( tr( "%1 to %2" ).arg(
range.begin().toString( locale.dateTimeFormat( QLocale::NarrowFormat ) ),
range.end().toString( locale.dateTimeFormat( QLocale::NarrowFormat ) ) ) );
}

QgsTemporalController *QgsTemporalControllerDockWidget::temporalController()
Expand Down
16 changes: 10 additions & 6 deletions src/gui/qgstemporalmapsettingsdialog.cpp
Expand Up @@ -24,14 +24,18 @@
QgsTemporalMapSettingsDialog::QgsTemporalMapSettingsDialog( QWidget *parent, Qt::WindowFlags flags )
: QDialog( parent, flags )
{
setupUi( this );

connect( this, &QDialog::accepted, this, &QgsTemporalMapSettingsDialog::accept );
connect( this, &QDialog::rejected, this, &QgsTemporalMapSettingsDialog::reject );
QVBoxLayout *vl = new QVBoxLayout( );

mTemporalMapSettingsWidget = new QgsTemporalMapSettingsWidget( this );
QVBoxLayout *layout = new QVBoxLayout( frame );
layout->addWidget( mTemporalMapSettingsWidget );

vl->addWidget( mTemporalMapSettingsWidget, 1 );

QDialogButtonBox *box = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel );
vl->addWidget( box );
setLayout( vl );

connect( box, &QDialogButtonBox::accepted, this, &QgsTemporalMapSettingsDialog::accept );
connect( box, &QDialogButtonBox::rejected, this, &QgsTemporalMapSettingsDialog::reject );

setWindowTitle( tr( "Temporal Map Settings" ) );
}
Expand Down

0 comments on commit 835f928

Please sign in to comment.