PowerTuneDigital / PowerTuneDigitalOfficial

Official PowerTune Digital Repo
GNU General Public License v3.0
18 stars 7 forks source link

Update Squaregauge.qml to have fixed decimal positioning on screen. #120

Open trackandtide opened 10 months ago

trackandtide commented 10 months ago

An attempt to keep centre but fix the decimal position in values. This change uses font.pixelSize which Is likely not the correct way, however seems functional in use for setting the starting centre position, then does not recentre the text as the string grows or shrinks. I believe the pixelSize value grows with both fontfamily and size attribute changes, so it seems to generally provide a 'good enough' scaled size even if it is the height of the font.

No tests with languages were done.

The change has a minor effect on the position of text in existing dashes.

Open for discussion on how to bring this feature which most other competitors have available to Powertune.

Some ideas: Breaking change - minor position change (this or some better code). Configurable per dash txt file so all squaregauges are the same for the dash. Configurable per squaregauge.