compute correct sizes when using TextMetrics
ClosedPublic

Authored by mgallien on May 13 2019, 8:09 PM.

Details

Summary

Use boundingRect of TextMetrics to compute the correct sizes

BUG: 407337

ensure all font.pointSize are set to integer values

Test Plan

Everything is looking fine

Diff Detail

Repository
R255 Elisa
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mgallien requested review of this revision.May 13 2019, 8:09 PM
mgallien created this revision.

Thanks, this fixes the problem in the playlist. I notice it's still there in the Frequently Played and Tracks lists, though:

Also in a future patch, it might make sense to replace all these occurrences of Math.round(elisaTheme.defaultFontPointSize * [something]) with a new global variables defining fixed font sizes that are multiples of the default size. Then they could all be adjusted in one place.

mgallien updated this revision to Diff 58034.May 13 2019, 9:01 PM
  • fix views with list of tracks

should fix all views with a list of tracks

Thanks, this fixes the problem in the playlist. I notice it's still there in the Frequently Played and Tracks lists, though:

Thanks a lot for your feedback.

Also in a future patch, it might make sense to replace all these occurrences of Math.round(elisaTheme.defaultFontPointSize * [something]) with a new global variables defining fixed font sizes that are multiples of the default size. Then they could all be adjusted in one place.

Sure, I should have done it earlier.

ngraham accepted this revision.May 13 2019, 9:32 PM

Shipit!

This revision is now accepted and ready to land.May 13 2019, 9:32 PM
This revision was automatically updated to reflect the committed changes.