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

Conversation

neolit123
Copy link
Member

@neolit123 neolit123 commented Aug 26, 2018

Describe the pull request:

  • Bug fix
  • Functional change
  • New feature
  • Code cleanup
  • Build system change
  • Documentation change
  • Language translation

Pull request long description:

Include font metrics as part of the height in DiveListDelegate::sizeHint().

When 22px is hardcoded, this handles small fonts, but for larger
fonts it seem that the bottom of the dive list row text is cut
on Windows.

Keep 22px as the minimum size hint, but for larger fonts
use QFontMetric::height().

Changes made:

  1. use font metrics in DiveListDelegate::sizeHint()

Related issues:

Refs #1600

Additional information:

NONE

Release note:

- Desktop: fix issue with dive list row height in case of larger fonts [#1600]

Documentation change:

NONE

Mentions:

@dirkhh

Include font metrics as part of the height in DiveListDelegate::sizeHint().

When 22px is hardcoded, this handles small fonts, but for larger
fonts it seem that the bottom of the dive list row text is cut
on Windows.

Keep 22px as the minimum size hint, but for larger fonts
use QFontMetric::height().

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
@neolit123 neolit123 changed the title Fix row height modeldelegates: use font metrics for dive list row height Aug 26, 2018
@dirkhh
Copy link
Collaborator

dirkhh commented Aug 27, 2018

This looks good.

@dirkhh dirkhh merged commit 5204af5 into subsurface:master Aug 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants