BasePreview no longer fix its own size in constructor
This prevented free-sized previews from correctly sizing
This commit is contained in:
parent
5aa29f575e
commit
6e323dbea7
3 changed files with 7 additions and 5 deletions
|
@ -374,6 +374,10 @@ void BaseForm::addPreview(BasePreview* preview, QString label)
|
||||||
_previews->layout()->addWidget(label_widget);
|
_previews->layout()->addWidget(label_widget);
|
||||||
_previews->layout()->addWidget(preview);
|
_previews->layout()->addWidget(preview);
|
||||||
|
|
||||||
|
preview->setMinimumSize(256, 256);
|
||||||
|
preview->setMaximumSize(256, 256);
|
||||||
|
preview->resize(256, 256);
|
||||||
|
|
||||||
_previews_list.append(preview);
|
_previews_list.append(preview);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,13 +27,13 @@ FormAtmosphere::FormAtmosphere(QWidget *parent):
|
||||||
|
|
||||||
previewWest = new BasePreview(this);
|
previewWest = new BasePreview(this);
|
||||||
previewWestRenderer = new AtmosphereColorPreviewRenderer(_definition, M_PI / 2.0);
|
previewWestRenderer = new AtmosphereColorPreviewRenderer(_definition, M_PI / 2.0);
|
||||||
previewWest->setRenderer(previewWestRenderer);
|
|
||||||
addPreview(previewWest, QString(tr("West preview")));
|
addPreview(previewWest, QString(tr("West preview")));
|
||||||
|
previewWest->setRenderer(previewWestRenderer);
|
||||||
|
|
||||||
previewEast = new BasePreview(this);
|
previewEast = new BasePreview(this);
|
||||||
previewEastRenderer = new AtmosphereColorPreviewRenderer(_definition, -M_PI / 2.0);
|
previewEastRenderer = new AtmosphereColorPreviewRenderer(_definition, -M_PI / 2.0);
|
||||||
previewEast->setRenderer(previewEastRenderer);
|
|
||||||
addPreview(previewEast, QString(tr("East preview")));
|
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"));
|
//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);
|
addInputInt(tr("Day time (hour)"), &_definition->hour, 0, 23, 1, 10);
|
||||||
|
|
|
@ -413,9 +413,7 @@ DrawingWidget(parent)
|
||||||
|
|
||||||
QObject::connect(this, SIGNAL(contentChange()), this, SLOT(update()));
|
QObject::connect(this, SIGNAL(contentChange()), this, SLOT(update()));
|
||||||
|
|
||||||
this->setMinimumSize(256, 256);
|
setMinimumSize(10, 10);
|
||||||
this->setMaximumSize(256, 256);
|
|
||||||
this->resize(256, 256);
|
|
||||||
|
|
||||||
startTimer(50);
|
startTimer(50);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue