mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Revert "Divelist: make the column headers for units left aligned"
This reverts commitd5f19c43c9
. With the changes to the headers in commit3515ad71c1
("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:
parent
d18d649a54
commit
c0536e8d57
1 changed files with 4 additions and 4 deletions
|
@ -1081,7 +1081,7 @@ static int nitrox_sort_value(struct dive *dive)
|
||||||
return he * 1000 + o2;
|
return he * 1000 + o2;
|
||||||
}
|
}
|
||||||
|
|
||||||
static QVariant dive_table_alignment(int column, bool isHeader)
|
static QVariant dive_table_alignment(int column)
|
||||||
{
|
{
|
||||||
QVariant retVal;
|
QVariant retVal;
|
||||||
switch (column) {
|
switch (column) {
|
||||||
|
@ -1093,7 +1093,7 @@ static QVariant dive_table_alignment(int column, bool isHeader)
|
||||||
case DiveTripModel::OTU:
|
case DiveTripModel::OTU:
|
||||||
case DiveTripModel::MAXCNS:
|
case DiveTripModel::MAXCNS:
|
||||||
// Right align numeric columns
|
// Right align numeric columns
|
||||||
retVal = int((isHeader ? Qt::AlignLeft : Qt::AlignRight) | Qt::AlignVCenter);
|
retVal = int(Qt::AlignRight | Qt::AlignVCenter);
|
||||||
break;
|
break;
|
||||||
// NR needs to be left aligned becase its the indent marker for trips too
|
// NR needs to be left aligned becase its the indent marker for trips too
|
||||||
case DiveTripModel::NR:
|
case DiveTripModel::NR:
|
||||||
|
@ -1116,7 +1116,7 @@ QVariant DiveItem::data(int column, int role) const
|
||||||
|
|
||||||
switch (role) {
|
switch (role) {
|
||||||
case Qt::TextAlignmentRole:
|
case Qt::TextAlignmentRole:
|
||||||
retVal = dive_table_alignment(column, false);
|
retVal = dive_table_alignment(column);
|
||||||
break;
|
break;
|
||||||
case DiveTripModel::SORT_ROLE:
|
case DiveTripModel::SORT_ROLE:
|
||||||
Q_ASSERT(dive != NULL);
|
Q_ASSERT(dive != NULL);
|
||||||
|
@ -1399,7 +1399,7 @@ QVariant DiveTripModel::headerData(int section, Qt::Orientation orientation, int
|
||||||
|
|
||||||
switch (role) {
|
switch (role) {
|
||||||
case Qt::TextAlignmentRole:
|
case Qt::TextAlignmentRole:
|
||||||
ret = dive_table_alignment(section, true);
|
ret = dive_table_alignment(section);
|
||||||
break;
|
break;
|
||||||
case Qt::FontRole:
|
case Qt::FontRole:
|
||||||
ret = defaultModelFont();
|
ret = defaultModelFont();
|
||||||
|
|
Loading…
Add table
Reference in a new issue