diff --git a/src/modules/locale/LocaleViewStep.cpp b/src/modules/locale/LocaleViewStep.cpp index 33780cd63..01758f1d6 100644 --- a/src/modules/locale/LocaleViewStep.cpp +++ b/src/modules/locale/LocaleViewStep.cpp @@ -19,8 +19,8 @@ #include "LocaleViewStep.h" #include "LocalePage.h" -#include "widgets/QtWaitingSpinner.h" #include "timezonewidget/localeglobal.h" +#include "widgets/WaitingWidget.h" #include "utils/CalamaresUtilsGui.h" @@ -38,38 +38,10 @@ LocaleViewStep::LocaleViewStep( QObject* parent ) m_widget->setLayout( mainLayout ); CalamaresUtils::unmarginLayout( mainLayout ); - QWidget* waitingWidget = new QWidget; - { - QBoxLayout* waitingLayout = new QVBoxLayout; - waitingWidget->setLayout( waitingLayout ); - waitingLayout->addStretch(); - QBoxLayout* pbLayout = new QHBoxLayout; - waitingLayout->addLayout( pbLayout ); - pbLayout->addStretch(); - - QtWaitingSpinner* spnr = new QtWaitingSpinner(); - pbLayout->addWidget( spnr ); - - pbLayout->addStretch(); - - QLabel* waitingLabel = new QLabel( "Loading location data..." ); + WaitingWidget* waitingWidget = + new WaitingWidget( tr( "Loading location data..." ) ); - int spnrSize = waitingLabel->fontMetrics().height() * 4; - spnr->setFixedSize( spnrSize, spnrSize ); - spnr->setRadius( spnrSize / 2 ); - spnr->setLength( spnrSize / 2 ); - spnr->setWidth( spnrSize / 8 ); - spnr->start(); - - waitingLabel->setAlignment( Qt::AlignCenter); - waitingLayout->addSpacing( spnrSize / 2 ); - waitingLayout->addWidget( waitingLabel ); - waitingLayout->addStretch(); - - mainLayout->addWidget( waitingWidget ); - - CalamaresUtils::unmarginLayout( waitingLayout ); - } + mainLayout->addWidget( waitingWidget ); connect( &m_initWatcher, &QFutureWatcher< void >::finished, [=]