aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/downloadfromdivecomputer.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-08 11:19:01 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-08 11:19:01 -0800
commit32824e8db8469187bf4358d91d4e1bb1ec5c925d (patch)
tree3c1418cacea28b26ccd3cf66088abad4a59f9aa7 /qt-ui/downloadfromdivecomputer.cpp
parent3854495832bfe4b075aeb5f9955aaf102467c882 (diff)
downloadsubsurface-32824e8db8469187bf4358d91d4e1bb1ec5c925d.tar.gz
Dive d/l selection UI: brute force size optimizations
This is horrible, but it gets something in place and hopefully we can clean this up soon. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/downloadfromdivecomputer.cpp')
-rw-r--r--qt-ui/downloadfromdivecomputer.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp
index e61668d73..a36db7daf 100644
--- a/qt-ui/downloadfromdivecomputer.cpp
+++ b/qt-ui/downloadfromdivecomputer.cpp
@@ -55,6 +55,16 @@ DownloadFromDCWidget::DownloadFromDCWidget(QWidget *parent, Qt::WindowFlags f) :
ui.progressBar->setMaximum(100);
diveImportedModel = new DiveImportedModel(this);
ui.downloadedView->setModel(diveImportedModel);
+ ui.downloadedView->setSelectionBehavior(QAbstractItemView::SelectRows);
+ ui.downloadedView->setSelectionMode(QAbstractItemView::SingleSelection);
+ int startingWidth = defaultModelFont().pointSize();
+ ui.downloadedView->setColumnWidth(0, startingWidth * 20);
+ ui.downloadedView->setColumnWidth(1, startingWidth * 15);
+ ui.downloadedView->setColumnWidth(2, startingWidth * 10);
+ QRect mainGeometry = parent->geometry();
+ int width = mainGeometry.width() * 0.8;
+ int height = mainGeometry.height() * 0.8;
+ resize(width, height);
progress_bar_text = "";