Is it possible to reduce the empty grey space in the mixer window (see above), to the left of the channel name and Mute button? This gap is quite appreciable on smaller screens and lower resolutions.
Mixer: reduce empty grey space on left of window and between checkboxes
The excess space adds up to an extra 1 cm of width, even on a high-res screen. Could the mixer be made narrower by reducing the space between both (1) the Mute and Solo checkboxes and (2) the Solo and Drumset checkboxes?
I can't see that margin being set anywhere (and I've tried all setting that are there), so there's no place to reduce it. So I guess we'd have to close this as 'By Design"
This code snippet shows how to remove spacing and margins between widgets in instance of QVBoxLayout.
pLayout =new QVBoxLayout(this);
pLayout->setSpacing(0);
pLayout->setMargin(0);// This is redundant with setMargin,// which is deprecated
pLayout->setContentsMargins(0,0,0,0);
pLayout->addWidget(m_pLabel, 0, Qt::AlignTop);
pLayout->addWidget(m_pButton, 0, Qt::AlignTop);
setLayout(pLayout);
We are using setMargin(0); already and setContentsMargins(0,0,0,0); is said to be redundant.
Indeed, I tried as well and I also tried to check if the margin was added inside one of the containing widgets (e.g. PartEditBase), or via a css style option, but all the margins I tried to modify were not changing the situation.
Luckily, the problem is only with 2.x and such margin has gone in master builds.
I found that I can reduce that margin by setting: setViewportMargins(-16,0,0,0);
in the QScrollArea widget, just before creating the area widget, here: https://github.com/musescore/MuseScore/blob/ad256226de14ad17a28f54bb5ca…
(Note again that this is only for the 2.2 branch)
I could test only under Windows, I don't know if such change introduces problems for 2.2-dev under the other operating systems, or for different screen resolutions.
Doing something like ABL describes is IMHO pretty much against design and also not worth the risk breaking things on other platforms, to much risk and effort for too little possible gain
Comments
The excess space adds up to an extra 1 cm of width, even on a high-res screen. Could the mixer be made narrower by reducing the space between both (1) the Mute and Solo checkboxes and (2) the Solo and Drumset checkboxes?
I can't see that margin being set anywhere (and I've tried all setting that are there), so there's no place to reduce it. So I guess we'd have to close this as 'By Design"
I think it could be set with setContentsMargins in the layout object hosting the widget, see here:
https://wiki.qt.io/Adjust_Spacing_and_Margins_between_Widgets_in_Layout
I think the layout object is set here:
https://github.com/musescore/MuseScore/blob/f26ebf688fb382e195d25cd0ee0…
OK, the documentation reads:
This code snippet shows how to remove spacing and margins between widgets in instance of QVBoxLayout.
We are using
setMargin(0);
already andsetContentsMargins(0,0,0,0);
is said to be redundant.So I tried it out anyway, it doesn't make a difference, neither
vb->setContentsMargins(0,0,0,0);
norarea->setContentsMargins(0,0,0,0);
Indeed, I tried as well and I also tried to check if the margin was added inside one of the containing widgets (e.g. PartEditBase), or via a css style option, but all the margins I tried to modify were not changing the situation.
Luckily, the problem is only with 2.x and such margin has gone in master builds.
I found that I can reduce that margin by setting:
setViewportMargins(-16,0,0,0);
in the QScrollArea widget, just before creating the
area
widget, here:https://github.com/musescore/MuseScore/blob/ad256226de14ad17a28f54bb5ca…
(Note again that this is only for the 2.2 branch)
I could test only under Windows, I don't know if such change introduces problems for 2.2-dev under the other operating systems, or for different screen resolutions.
Doing something like ABL describes is IMHO pretty much against design and also not worth the risk breaking things on other platforms, to much risk and effort for too little possible gain