Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library: center date values, right-align Track # #13674

Merged
merged 2 commits into from
Nov 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/library/basetracktablemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -995,11 +995,17 @@ QVariant BaseTrackTableModel::roleValue(
switch (field) {
case ColumnCache::COLUMN_LIBRARYTABLE_BPM:
case ColumnCache::COLUMN_LIBRARYTABLE_DURATION:
case ColumnCache::COLUMN_LIBRARYTABLE_BITRATE: {
case ColumnCache::COLUMN_LIBRARYTABLE_BITRATE:
case ColumnCache::COLUMN_LIBRARYTABLE_TRACKNUMBER: {
// We need to cast to int due to a bug similar to
// https://bugreports.qt.io/browse/QTBUG-67582
return static_cast<int>(Qt::AlignVCenter | Qt::AlignRight);
}
case ColumnCache::COLUMN_LIBRARYTABLE_DATETIMEADDED:
case ColumnCache::COLUMN_PLAYLISTTRACKSTABLE_DATETIMEADDED:
case ColumnCache::COLUMN_LIBRARYTABLE_LAST_PLAYED_AT: {
return static_cast<int>(Qt::AlignVCenter | Qt::AlignHCenter);
}
default:
return QVariant(); // default AlignLeft for all other columns
}
Expand Down
Loading