From 0416a09a1e3d2a2fe3f97dbe098520bb24cc2a8d Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Mon, 4 Aug 2014 13:27:29 -0300 Subject: [PATCH] Fix the layout on the Print Dialog The layout was a hardcoded position without layouts, that would only work on english language since other languages can have bigger strings than the current ones. Also removed the 'setFixedSize' stuff and let the widget find it's best size for itself. Fixes #656 Fixes #396 Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/printdialog.cpp | 1 - qt-ui/printoptions.ui | 375 +++++++++++++++++++----------------------- 2 files changed, 166 insertions(+), 210 deletions(-) diff --git a/qt-ui/printdialog.cpp b/qt-ui/printdialog.cpp index 472b7d942..e8a323e03 100644 --- a/qt-ui/printdialog.cpp +++ b/qt-ui/printdialog.cpp @@ -57,7 +57,6 @@ PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f hLayout->addWidget(buttonBox); - setFixedSize(550, 400); setWindowTitle(tr("Print")); setWindowIcon(QIcon(":subsurface-icon")); diff --git a/qt-ui/printoptions.ui b/qt-ui/printoptions.ui index e7bdbf683..59a48b956 100644 --- a/qt-ui/printoptions.ui +++ b/qt-ui/printoptions.ui @@ -6,224 +6,181 @@ 0 0 - 511 - 308 + 367 + 433 - - - - 10 - 70 - 489 - 81 - - - - Print options - - - - - 10 - 30 - 461 - 18 - - - - - 0 - 0 - - - - Print only selected dives - - - - - - 10 - 50 - 461 - 18 - - - - - 0 - 0 - - - - Print in color - - - - - - - 10 - 10 - 489 - 51 - - - - - 0 - 0 - - - - - 0 - 0 - - - - Print type - - - - - 0 - 20 - 491 - 31 - - - - - QLayout::SetDefaultConstraint + + + + + + 0 + 0 + - - 15 + + + 0 + 0 + - - 15 + + Print type - - - - - 0 - 0 - - - - 6 dives per page - - - true - - - - - - - - 0 - 0 - - - - 2 dives per page - - - - - - - - 0 - 0 - - - - 1 dive per page - - - - - - - - 0 - 0 - - - - Table print - - - - - - - - - - 10 - 160 - 489 - 81 - - - - Ordering - - - - - 10 - 30 - 461 - 18 - - - - - 0 - 0 - - - - Profile on top - - - true - - - - - - 10 - 50 - 461 - 18 - - - - - 0 - 0 - - - - Notes on top - - - false - - - + + + + + + 0 + 0 + + + + &6 dives per page + + + true + + + + + + + + 0 + 0 + + + + &1 dive per page + + + + + + + + 0 + 0 + + + + &2 dives per page + + + + + + + + 0 + 0 + + + + &Table print + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + Print options + + + + + + + 0 + 0 + + + + Print only selected dives + + + + + + + + 0 + 0 + + + + Print in color + + + + + + + + + + Ordering + + + + + + + 0 + 0 + + + + Prof&ile on top + + + true + + + + + + + + 0 + 0 + + + + &Notes on top + + + false + + + + + + + radioSixDives radioTwoDives - radioTablePrint printSelected printInColor profileOnTop