Thanks Ted for the digging!
On 14/11/2024 17:06, Ted Felix wrote:
> If you keep digging, it looks like TrackButtons::makeButton() is
asking for square buttons that are height x height. This makes sense
since they are round. If we make them rectangular, I assume they won't
really scale.
>
> Then TrackLabel's ctor, only takes the height, but it scales the
font up as well, so the minimum width for 18 "X"'s becomes larger and
larger, thus increasing the width of the label.
>
> As it is, the feature is mainly geared toward dealing with HiDPI
displays, so scaling everything is the right approach.
>
> Sounds like you want tall tracks, but small buttons. It should be
possible to separate the two scale factors. Have one for the buttons
and one for the track height.
>
Ah actually your digging got me digging more and I see that in
TrackLabel::TrackLabel there is this (the 18 chars or 'X' as you mentiond)
setMinimumWidth(fontMetrics.boundingRect("XXXXXXXXXXXXXXXXXX").width());
And reducing it will achieve what I was thinking of i.e. still square
buttons but a shorter track label.
For example this screenshot shows a new 'extra large' track size with
sizeFactor = 194and that setMinimumWidth set to to 12 characters instead
of 18:
https://gcdnb.pbrd.co/images/fUhaYtJFeKMy.png?o=1
I guess it's hard though to find a 'sweet-spot' width which will work
for all depending on what kind of labels users use and / or device names
if they don't display labels (which I always do)...
Wonder if that should be a configurable parameter as well? (or maybe
also a track width parameter (something like 'small' 'medium' 'large'
where say small is 8 chars, medium is 12 and large is 16 or 18)?
Lorenzo
_______________________________________________
Rosegarden-devel mailing list
Rosegarden-devel@lists.sourceforge.net - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel