jfjoch_viewer: Don't restrict height of dock widgets
This commit is contained in:
@@ -330,7 +330,6 @@ void JFJochViewerWindow::LoadImage(qint64 image_number, qint64 summation) {
|
||||
emit LoadImageRequest(image_number, summation);
|
||||
}
|
||||
|
||||
|
||||
void JFJochViewerWindow::NewDatasetInfo() {
|
||||
auto info = new JFJochViewerDatasetInfo(this);
|
||||
info->datasetLoaded(lastDataset);
|
||||
@@ -339,28 +338,12 @@ void JFJochViewerWindow::NewDatasetInfo() {
|
||||
auto dock = new QDockWidget(QString("Dataset info"), this);
|
||||
dock->setAllowedAreas(Qt::BottomDockWidgetArea);
|
||||
dock->setFeatures(
|
||||
QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable | QDockWidget::DockWidgetClosable);
|
||||
QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable | QDockWidget::DockWidgetClosable |
|
||||
QDockWidget::DockWidgetVerticalTitleBar);
|
||||
dock->setAttribute(Qt::WA_DeleteOnClose);
|
||||
dock->setWidget(info);
|
||||
addDockWidget(Qt::BottomDockWidgetArea, dock);
|
||||
|
||||
// Docked vs floating sizing behavior, same as the initial widget
|
||||
info->setMinimumHeight(200);
|
||||
info->setMaximumHeight(200);
|
||||
info->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
|
||||
connect(dock, &QDockWidget::topLevelChanged, this, [info](bool floating) {
|
||||
if (floating) {
|
||||
info->setMinimumHeight(0);
|
||||
info->setMaximumHeight(QWIDGETSIZE_MAX);
|
||||
info->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
|
||||
} else {
|
||||
info->setMinimumHeight(200);
|
||||
info->setMaximumHeight(200);
|
||||
info->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
|
||||
}
|
||||
info->updateGeometry();
|
||||
});
|
||||
|
||||
// Wire signals like the initial dataset_info
|
||||
connect(reading_worker, &JFJochImageReadingWorker::datasetLoaded,
|
||||
info, &JFJochViewerDatasetInfo::datasetLoaded);
|
||||
|
||||
@@ -694,7 +694,7 @@ void JFJochImage::CalcROI() {
|
||||
|
||||
void JFJochImage::fitToView() {
|
||||
initial_fit_done_ = false;
|
||||
updateOverlay();
|
||||
Redraw();
|
||||
}
|
||||
|
||||
void JFJochImage::fitToViewShorterSideOnce() {
|
||||
|
||||
Reference in New Issue
Block a user