aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/models.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-10-30 10:19:39 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-10-30 10:21:59 -0700
commitc0536e8d57840053a42bc9fe59d4ad9ca4615551 (patch)
treeb018e5233806b9384f6d9df9f551d566eed23156 /qt-ui/models.cpp
parentd18d649a549631bba6891349a96c28d840b4f186 (diff)
downloadsubsurface-c0536e8d57840053a42bc9fe59d4ad9ca4615551.tar.gz
Revert "Divelist: make the column headers for units left aligned"
This reverts commit d5f19c43c925468f363f0e509816df724f930db9. With the changes to the headers in commit 3515ad71c159 ("Divelist: remove units from header, add tooltip") I think this isn't needed anymore and actually reverting it creates a cleaner look. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/models.cpp')
-rw-r--r--qt-ui/models.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index bf1c6a6de..4b86605d3 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -1081,7 +1081,7 @@ static int nitrox_sort_value(struct dive *dive)
return he * 1000 + o2;
}
-static QVariant dive_table_alignment(int column, bool isHeader)
+static QVariant dive_table_alignment(int column)
{
QVariant retVal;
switch (column) {
@@ -1093,7 +1093,7 @@ static QVariant dive_table_alignment(int column, bool isHeader)
case DiveTripModel::OTU:
case DiveTripModel::MAXCNS:
// Right align numeric columns
- retVal = int((isHeader ? Qt::AlignLeft : Qt::AlignRight) | Qt::AlignVCenter);
+ retVal = int(Qt::AlignRight | Qt::AlignVCenter);
break;
// NR needs to be left aligned becase its the indent marker for trips too
case DiveTripModel::NR:
@@ -1116,7 +1116,7 @@ QVariant DiveItem::data(int column, int role) const
switch (role) {
case Qt::TextAlignmentRole:
- retVal = dive_table_alignment(column, false);
+ retVal = dive_table_alignment(column);
break;
case DiveTripModel::SORT_ROLE:
Q_ASSERT(dive != NULL);
@@ -1399,7 +1399,7 @@ QVariant DiveTripModel::headerData(int section, Qt::Orientation orientation, int
switch (role) {
case Qt::TextAlignmentRole:
- ret = dive_table_alignment(section, true);
+ ret = dive_table_alignment(section);
break;
case Qt::FontRole:
ret = defaultModelFont();