LMMS / lmms

Cross-platform music production software
https://lmms.io
GNU General Public License v2.0
8.16k stars 1.01k forks source link

Scale channel name labels to fit window size. #7509

Open Gabrielxd195 opened 1 month ago

Gabrielxd195 commented 1 month ago

Enhancement Summary

Channel name labels in the mixer cannot be stretched; however, volume controls can, which makes the mixer look very disproportionate and unpleasant to look at, and you cannot see the full titles on the channels. Make labels and volume controls proportional to the size of the windows: half and half.

Implementation Details / Mockup

Escalar etiquetas conforme al tamaño de la ventana

Please search the issue tracker for existing feature requests before submitting your own.

michaelgregorius commented 1 month ago

Unfortunately, this is not as simple as it might seem at first sight. Normally, one would change the 0 in the following line to something else, e.g. a 1: https://github.com/LMMS/lmms/blob/01294192c8e39158e21e404bfec09139f78caaf3/src/gui/MixerChannelView.cpp#L138

This would then let the name label grow one unit whenever the fader grows a unit, because it's also set to 1: https://github.com/LMMS/lmms/blob/01294192c8e39158e21e404bfec09139f78caaf3/src/gui/MixerChannelView.cpp#L141

However, making these changes leads to the same behavior as before. That's because the (re)name label is set to a fixed size: https://github.com/LMMS/lmms/blob/01294192c8e39158e21e404bfec09139f78caaf3/src/gui/MixerChannelView.cpp#L90

Commenting this out makes the name label take more potential space but the label text is still small and the mixer strips become quite a lot wider:

7509-ScalableMixerChannelNames

As you can see the actual label texts are still small though.

Setting the edit to a fixed width instead of a fixed size also has not effect, i.e. the following does not work:

m_renameLineEditView->setFixedWidth(m_renameLineEdit->width() + 5);

The reason is that the name label has quite some complex implementation, i.e. it is a QGraphicsScene which display the actual line edit. I think this was done so that the rename dialog is also rotated by 90 degrees if you rename the channel.

The width of the mixer channel is the width that's set here: https://github.com/LMMS/lmms/blob/01294192c8e39158e21e404bfec09139f78caaf3/src/gui/MixerChannelView.cpp#L76

If you increase this size then the mixer channel will become even wider.

This all needs to be fixed or reimplemented if someone wants to tackle this.