From 098aa6343b7b806c5c23f6e55c52b998bbe0c388 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Thu, 26 Sep 2013 18:14:09 -0300 Subject: Fixed the display of Subsurface in Smaller Screens This patch fixes the display of subsurface in smaller screens by creating ScrollArea containers that are now englobbing each of the Tab-pages and the Planner Widget. Some of those widgets were pretty big by the amount of things on it and it was too big for small ( 14" and 15" ) screens. This seems to fix it, and looks good both on Gtk+ and Oxygen styles. Signed-off-by: Tomaz Canabrava --- qt-ui/diveplanner.cpp | 3 + qt-ui/diveplanner.ui | 213 +++++---- qt-ui/globe.cpp | 6 +- qt-ui/maintab.cpp | 5 +- qt-ui/maintab.ui | 1160 ++++++++++++++++++++++++++++--------------------- 5 files changed, 807 insertions(+), 580 deletions(-) (limited to 'qt-ui') diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index f23970a29..4fbdc5eb0 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -887,6 +887,9 @@ DivePlannerWidget::DivePlannerWidget(QWidget* parent, Qt::WindowFlags f): QWidge ui->decoStopSAC->setText("17"); ui->lowGF->setText("30"); ui->highGF->setText("75"); + + setMinimumWidth(0); + setMinimumHeight(0); } void DivePlannerWidget::startTimeChanged(const QTime& time) diff --git a/qt-ui/diveplanner.ui b/qt-ui/diveplanner.ui index 1bcd912a4..462c26e48 100644 --- a/qt-ui/diveplanner.ui +++ b/qt-ui/diveplanner.ui @@ -14,88 +14,143 @@ Form - - - - Start Time + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + QFrame::NoFrame - - - - - - ATM Pressure - - - - - - - - - - - - - - - - - - - Low GF - - - - - - - Bottom SAC - - - - - - - - - - High GF - - - - - - - - - - SAC on DECO Stop - - - - - - - Last Stop at 6m + + QFrame::Plain - - - - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - 0 - 0 - + + true + + + + 0 + 0 + 400 + 352 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 2 + + + + + + + + Bottom SAC + + + + + + + High GF + + + + + + + SAC on DECO Stop + + + + + + + + + + + + + Low GF + + + + + + + + + + + + + Last Stop at 6m + + + + + + + + 0 + 0 + + + + + + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + + Start Time + + + + + + + ATM Pressure + + + + + diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp index c16af93cf..87dc4275b 100644 --- a/qt-ui/globe.cpp +++ b/qt-ui/globe.cpp @@ -57,7 +57,11 @@ GlobeGPS::GlobeGPS(QWidget* parent) : MarbleWidget(parent), loadedDives(0) setShowOverviewMap(false); setShowScaleBar(true); setShowCompass(false); - connect(this, SIGNAL(mouseClickGeoPosition(qreal, qreal, GeoDataCoordinates::Unit)), this, SLOT(mouseClicked(qreal, qreal, GeoDataCoordinates::Unit))); + connect(this, SIGNAL(mouseClickGeoPosition(qreal, qreal, GeoDataCoordinates::Unit)), + this, SLOT(mouseClicked(qreal, qreal, GeoDataCoordinates::Unit))); + + setMinimumHeight(0); + setMinimumWidth(0); } void GlobeGPS::mouseClicked(qreal lon, qreal lat, GeoDataCoordinates::Unit unit) diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 43529ec3c..98247566a 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -93,6 +93,9 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent), ui->divemaster->setCompleter(completers.divemaster); ui->location->setCompleter(completers.location); ui->suit->setCompleter(completers.suit); + + setMinimumHeight(0); + setMinimumWidth(0); } void MainTab::addDiveStarted() @@ -315,7 +318,7 @@ void MainTab::updateDiveInfo(int dive) ui->airPressureText->setText(QString("%1mbar").arg(d->surface_pressure.mbar)); else ui->airPressureText->clear(); - ui->depthLimits->setMaximum(get_depth_string(stats_selection.max_depth, TRUE)); + (get_depth_string(stats_selection.max_depth, TRUE)); ui->depthLimits->setMinimum(get_depth_string(stats_selection.min_depth, TRUE)); ui->depthLimits->setAverage(get_depth_string(stats_selection.avg_depth, TRUE)); ui->sacLimits->setMaximum(get_volume_string(stats_selection.max_sac, TRUE).append(tr("/min"))); diff --git a/qt-ui/maintab.ui b/qt-ui/maintab.ui index e56350ada..031aa0df0 100644 --- a/qt-ui/maintab.ui +++ b/qt-ui/maintab.ui @@ -6,8 +6,8 @@ 0 0 - 505 - 610 + 535 + 517 @@ -21,168 +21,208 @@ Dive Notes - - - - false - - - - - - - false - - - - - - - Location - - - - - - - false - - - - - - - false - - - - - - - false - - - - - - - false + + + + QFrame::NoFrame - - - - - - Divemaster + + QFrame::Plain - - - - - - Buddy + + true - - - - - - - - Rating + + + + 0 + 0 + 513 + 468 + + + + + 0 - - - - - - Visibility + + 0 - - - - - - - - Suit - - - - - - - Notes - - - - - - - - - - - - - - - - - Coordinates - - - - - - - Starttime - - - - - - - - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - M/d/yy h:mm - - - true - - - - - - - - - false + + 0 - - - - - - false + + 0 - - - - - - - - air / water Temperatures - + + 2 + + + + + + + + Starttime + + + + + + + air / water Temperatures + + + + + + + M/d/yy h:mm + + + true + + + + + + + + + false + + + + + + + false + + + + + + + + + Location + + + + + + + false + + + + + + + Coordinates + + + + + + + false + + + + + + + Divemaster + + + + + + + Buddy + + + + + + + false + + + + + + + false + + + + + + + + + Rating + + + + + + + Visibility + + + + + + + + + Suit + + + + + + + + + + + + + + + + + false + + + + + + + Notes + + + + + + + false + + + + + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + @@ -192,35 +232,84 @@ Equipment - - - - - 0 - - - 0 - - - - - Qt::Vertical - - - - - - - - - - - - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + QFrame::NoFrame + + + QFrame::Plain + + + true + + + + 0 + 0 + 513 + 468 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 2 + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Qt::Vertical + + + + + + + + + + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + @@ -230,232 +319,272 @@ Dive Info - - - - SAC - - - - - - - - - Qt::AlignCenter - - - - - - - - - - Gases Used - - - - - - - - - Qt::AlignCenter - - - - - - - - - - OTU - - - - - - - - - Qt::AlignCenter - - - - - - - - - Date - - - - - - - - - Qt::AlignCenter - - - - - - - - - - Air Pressure - - - - - - - - - Qt::AlignCenter - - - - - - - - - - Air Temperature - - - - - - - - - Qt::AlignCenter - - - - - - - - - - Gas Consumed - - - - - - - - - Qt::AlignCenter - - - - - - - - - - Max. Depth - - - - - - - - - Qt::AlignCenter - - - - - - - - - - Ave. Depth + + + QFrame::NoFrame - - - - - - - - Qt::AlignCenter - - - - - - - - - - Water Temperature - - - - - - - - - Qt::AlignCenter - - - - - - - - - - Interval + + QFrame::Plain - - - - - - - - Qt::AlignCenter - - - - - - - - - - Dive Time + + true - - - - - - - - Qt::AlignCenter - - - - + + + + 0 + 0 + 513 + 468 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 2 + + + + + Date + + + + + + + + + Qt::AlignCenter + + + + + + + + + + Interval + + + + + + + + + Qt::AlignCenter + + + + + + + + + + Gases Used + + + + + + + + + Qt::AlignCenter + + + + + + + + + + Gas Consumed + + + + + + + + + Qt::AlignCenter + + + + + + + + + + SAC + + + + + + + + + Qt::AlignCenter + + + + + + + + + + Max. Depth + + + + + + + + + Qt::AlignCenter + + + + + + + + + + Ave. Depth + + + + + + + + + Qt::AlignCenter + + + + + + + + + + OTU + + + + + + + + + Qt::AlignCenter + + + + + + + + + + Air Pressure + + + + + + + + + Qt::AlignCenter + + + + + + + + + + Air Temperature + + + + + + + + + Qt::AlignCenter + + + + + + + + + + Water Temperature + + + + + + + + + Qt::AlignCenter + + + + + + + + + + Dive Time + + + + + + + + + Qt::AlignCenter + + + + + + + + @@ -465,90 +594,136 @@ Stats - - - - SAC - - - - - - - - - - - Temperature - - - - - - - - - - - - Depth - - - - - - - - - - - - Duration + + + QFrame::NoFrame - - - - - - - - - - - Total Time + + QFrame::Plain - - - - - - - - Qt::AlignCenter - - - - - - - - - - Dives + + true - - - - - - - - Qt::AlignCenter - - - - + + + + 0 + 0 + 513 + 468 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 2 + + + + + Depth + + + + + + + + + + + + Temperature + + + + + + + + + + + + SAC + + + + + + + + + + + + Duration + + + + + + + + + + + + Total Time + + + + + + + + + Qt::AlignCenter + + + + + + + + + + Dives + + + + + + + + + Qt::AlignCenter + + + + + + + + groupBox_8b + groupBox_4b + groupBox_11b + groupBox_14 + groupBoxb + groupBox_7b + @@ -580,19 +755,6 @@ 1 - - dateTimeEdit - airtemp - watertemp - location - coordinates - divemaster - buddy - suit - notes - notesButtonBox - equipmentButtonBox - -- cgit v1.2.3-70-g09d2