From af3dd1e8350b900ea44deff581d6e7e733bd4f5b Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 13 Jan 2015 21:20:32 +1300 Subject: Attempt a better layout for the download dialog This seems to work well and provides a lot less wasted space. Signed-off-by: Dirk Hohndel --- qt-ui/downloadfromdivecomputer.cpp | 6 +- qt-ui/downloadfromdivecomputer.ui | 152 ++++++++++++++++++------------------- 2 files changed, 75 insertions(+), 83 deletions(-) diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp index 10a3a20b8..ef59c1804 100644 --- a/qt-ui/downloadfromdivecomputer.cpp +++ b/qt-ui/downloadfromdivecomputer.cpp @@ -62,13 +62,9 @@ DownloadFromDCWidget::DownloadFromDCWidget(QWidget *parent, Qt::WindowFlags f) : ui.downloadedView->setSelectionMode(QAbstractItemView::SingleSelection); int startingWidth = defaultModelFont().pointSize(); ui.downloadedView->setColumnWidth(0, startingWidth * 20); - ui.downloadedView->setColumnWidth(1, startingWidth * 15); + ui.downloadedView->setColumnWidth(1, startingWidth * 10); ui.downloadedView->setColumnWidth(2, startingWidth * 10); connect(ui.downloadedView, SIGNAL(clicked(QModelIndex)), diveImportedModel, SLOT(changeSelected(QModelIndex))); - QRect mainGeometry = parent->geometry(); - int width = mainGeometry.width() * 0.8; - int height = mainGeometry.height() * 0.8; - resize(width, height); progress_bar_text = ""; diff --git a/qt-ui/downloadfromdivecomputer.ui b/qt-ui/downloadfromdivecomputer.ui index 004895038..8d3f5c1dc 100644 --- a/qt-ui/downloadfromdivecomputer.ui +++ b/qt-ui/downloadfromdivecomputer.ui @@ -20,109 +20,136 @@ - - - - - Vendor - - - - - - - Dive computer - - - - - - - - - - - - - + - + Device or mount point - + true - + ... - + Force download of all dives - + Always prefer downloaded dives - + Download into new trip - + Save libdivecomputer logfile - + ... - + Save libdivecomputer dumpfile - + ... + + + + Vendor + + + + + + + + + + Dive computer + + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Download + + + - + + + 0 + + + + + Qt::Vertical @@ -135,9 +162,9 @@ - + - + Qt::Horizontal @@ -150,9 +177,16 @@ - + - Download + OK + + + + + + + Cancel @@ -211,44 +245,6 @@ - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - OK - - - - - - - Cancel - - - - - - - - - 0 - - - -- cgit v1.2.3-70-g09d2