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

modeldelegates: use font metrics for dive list row height #1602

Merged
merged 2 commits into from Aug 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
@@ -1,3 +1,4 @@
- Desktop: fix issue with dive list row height in case of larger fonts [#1600]
- Mobile: add default cylinder functionality for new dives [#1535]
- Desktop/Export: fix bug related to quoted text when exporting to HTML [#1576]
- Desktop/Map-Widget: add support for filtering of map locations [#1581]
Expand Down
3 changes: 2 additions & 1 deletion desktop-widgets/modeldelegates.cpp
Expand Up @@ -24,7 +24,8 @@

QSize DiveListDelegate::sizeHint(const QStyleOptionViewItem&, const QModelIndex&) const
{
return QSize(50, 22);
const QFontMetrics metrics(qApp->font());
return QSize(50, qMax(22, metrics.height()));
}

// Gets the index of the model in the currentRow and column.
Expand Down