Revert "Divelist: make the column headers for units left aligned"

This reverts commit d5f19c43c9.

With the changes to the headers in commit 3515ad71c1 ("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>
This commit is contained in:
Dirk Hohndel 2014-10-30 10:19:39 -07:00
parent d18d649a54
commit c0536e8d57

View file

@ -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();