mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-30 15:52:12 +01:00
cb8dd90ad7
- I resolve the PRN text scaling issue by comparing the scaled text height with the available space. If there is not enough space available, the scaling factor is updated so the final scale factor fills the available space as much as possible. If the height limit has been reached, the corrected scaling is applied to both the PRN and the SNR text to keep both about the same size. - This scaling works fine on my Windows PC. I therefore removed the maximum width limit for the snrwidget. (was 850px) The snr widget will now take up all available width. This does not mean that individual bars will be scaled to fit the width of the widget. However I have implemented a two step scaling for that. If there are less than 16 visible satellites, the width of each bar is calculated based on a total of 16 bars in the view. Just like before my changes. If there are more than 16 satellites visible, the number of bars displayed is incremented from 16 to 24. An aging based hysteresis has been added to prevent continuous flapping between both states. I think this solution is aesthetically more pleasing than scaling the width of the bars to the width of the widget. Especially for low number of satellites. (This solution would show massive bars if only a few satellites are visible) - Since there was no copyright header in gpssnrwidget.cpp and gpssnrwidget.h, I have added one. The OP line is based on the last changes seen in the OP repo.