Skip to content

Commit

Permalink
Use narrow Date/Time format in the timestamp column
Browse files Browse the repository at this point in the history
  • Loading branch information
daschuer committed Aug 19, 2022
1 parent e21f7d8 commit efb64b1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/library/basetracktablemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -643,8 +643,15 @@ QVariant BaseTrackTableModel::roleValue(
}
QDateTime dt = mixxx::localDateTimeFromUtc(rawValue.toDateTime());
if (role == Qt::ToolTipRole || role == kDataExportRole) {
// localized text date: "Wednesday, May 20, 1998 03:40:13 AM CEST"
return dt;
}
if (field == ColumnCache::COLUMN_PLAYLISTTRACKSTABLE_DATETIMEADDED) {
// Timstamp column in history feature:
// Use localized date/time format without text: "5/20/98 03:40 AM"
return QLocale().toString(dt, QLocale::NarrowFormat);
}
// For Date Added, use just the date: "5/20/98"
return dt.date();
}
case ColumnCache::COLUMN_LIBRARYTABLE_LAST_PLAYED_AT: {
Expand Down

0 comments on commit efb64b1

Please sign in to comment.