diff --git a/src/interface/desktop/baseform.cpp b/src/interface/desktop/baseform.cpp index 9283a4f..5b8faf4 100644 --- a/src/interface/desktop/baseform.cpp +++ b/src/interface/desktop/baseform.cpp @@ -374,6 +374,10 @@ void BaseForm::addPreview(BasePreview* preview, QString label) _previews->layout()->addWidget(label_widget); _previews->layout()->addWidget(preview); + preview->setMinimumSize(256, 256); + preview->setMaximumSize(256, 256); + preview->resize(256, 256); + _previews_list.append(preview); } diff --git a/src/interface/desktop/formatmosphere.cpp b/src/interface/desktop/formatmosphere.cpp index 37abd33..1285244 100644 --- a/src/interface/desktop/formatmosphere.cpp +++ b/src/interface/desktop/formatmosphere.cpp @@ -27,13 +27,13 @@ FormAtmosphere::FormAtmosphere(QWidget *parent): previewWest = new BasePreview(this); previewWestRenderer = new AtmosphereColorPreviewRenderer(_definition, M_PI / 2.0); - previewWest->setRenderer(previewWestRenderer); addPreview(previewWest, QString(tr("West preview"))); + previewWest->setRenderer(previewWestRenderer); previewEast = new BasePreview(this); previewEastRenderer = new AtmosphereColorPreviewRenderer(_definition, -M_PI / 2.0); - previewEast->setRenderer(previewEastRenderer); addPreview(previewEast, QString(tr("East preview"))); + previewEast->setRenderer(previewEastRenderer); //addInputEnum(tr("Color model"), (int*)&_definition->model, QStringList(tr("Simplified model (with weather)")) << tr("Complex model")); addInputInt(tr("Day time (hour)"), &_definition->hour, 0, 23, 1, 10); diff --git a/src/render/preview/BasePreview.cpp b/src/render/preview/BasePreview.cpp index 63f8d80..bbac1c1 100644 --- a/src/render/preview/BasePreview.cpp +++ b/src/render/preview/BasePreview.cpp @@ -413,9 +413,7 @@ DrawingWidget(parent) QObject::connect(this, SIGNAL(contentChange()), this, SLOT(update())); - this->setMinimumSize(256, 256); - this->setMaximumSize(256, 256); - this->resize(256, 256); + setMinimumSize(10, 10); startTimer(50); }