Adds the new solo behavior as a new LED button

To allow the user choosing between the old solo behavior and the new one, a new LED button was added which will be used to enable the solo keeping the automation tracks states, while the red LED will enable the solo with the current behavior.

Changes to the code:
	- Added a purple LED image that will be used on the new button.
	- Increased the default width of the widget that holds the mute and solo buttons so the third one fits.
	- Changed the positioning of the LEDs on both the standard and compact track modes to accomodate them.
	- Added a new model called m_soloAutomationsModel, which is connected to the new LED button (m_soloAutomationsBtn). This will dictate the behavior of the toggleSolo method.
	- The red LED calls the toggleSolo method as before. The purple LED will change the m_soloAutomationsModel value and toggle the red LED, which will then call toggleSolo. But since the value of m_soloAutomationsModel will be different, the new behavior will be used on the method.
This commit is contained in:
IanCaio
2020-06-30 16:02:02 -03:00
parent 149ef0bd50
commit fdbc8b2712
4 changed files with 43 additions and 7 deletions

View File

@@ -57,7 +57,7 @@ class TrackView;
const int DEFAULT_SETTINGS_WIDGET_WIDTH = 224;
const int TRACK_OP_WIDTH = 78;
const int TRACK_OP_WIDTH = 94;
// This shaves 150-ish pixels off track buttons,
// ruled from config: ui.compacttrackbuttons
const int DEFAULT_SETTINGS_WIDGET_WIDTH_COMPACT = 96;
@@ -466,6 +466,7 @@ private:
QPushButton * m_trackOps;
PixmapButton * m_muteBtn;
PixmapButton * m_soloBtn;
PixmapButton * m_soloAutomationsBtn; // Purple LED that enables solo with automations
friend class TrackView;
@@ -629,6 +630,8 @@ private:
BoolModel m_soloModel;
bool m_mutedBeforeSolo;
BoolModel m_soloAutomationsModel; // That option prevents solo from muting automation tracks
bool m_simpleSerializingMode;
tcoVector m_trackContentObjects;