Make the send button and receive arrow occupy the same space in mixer channels (#7503)

This commit is contained in:
saker
2024-09-19 12:53:40 -04:00
committed by GitHub
parent c952d56591
commit 1d7ed16dc9
3 changed files with 51 additions and 70 deletions

View File

@@ -37,6 +37,7 @@
#include <QLineEdit>
#include <QPixmap>
#include <QWidget>
#include <QStackedWidget>
namespace lmms
{
@@ -59,11 +60,6 @@ namespace lmms::gui
Q_PROPERTY(QColor strokeInnerActive READ strokeInnerActive WRITE setStrokeInnerActive)
Q_PROPERTY(QColor strokeInnerInactive READ strokeInnerInactive WRITE setStrokeInnerInactive)
public:
enum class SendReceiveState
{
None, SendToThis, ReceiveFromThis
};
MixerChannelView(QWidget* parent, MixerView* mixerView, int channelIndex);
void paintEvent(QPaintEvent* event) override;
void contextMenuEvent(QContextMenuEvent*) override;
@@ -74,9 +70,6 @@ namespace lmms::gui
int channelIndex() const;
void setChannelIndex(int index);
SendReceiveState sendReceiveState() const;
void setSendReceiveState(const SendReceiveState& state);
QBrush backgroundActive() const;
void setBackgroundActive(const QBrush& c);
@@ -115,19 +108,22 @@ namespace lmms::gui
private:
SendButtonIndicator* m_sendButton;
QLabel* m_receiveArrow;
QStackedWidget* m_receiveArrowOrSendButton;
int m_receiveArrowStackedIndex = -1;
int m_sendButtonStackedIndex = -1;
Knob* m_sendKnob;
LcdWidget* m_channelNumberLcd;
QLineEdit* m_renameLineEdit;
QGraphicsView* m_renameLineEditView;
QLabel* m_sendArrow;
QLabel* m_receiveArrow;
PixmapButton* m_muteButton;
PixmapButton* m_soloButton;
PeakIndicator* m_peakIndicator = nullptr;
Fader* m_fader;
EffectRackView* m_effectRackView;
MixerView* m_mixerView;
SendReceiveState m_sendReceiveState = SendReceiveState::None;
int m_channelIndex = 0;
bool m_inRename = false;
@@ -141,4 +137,4 @@ namespace lmms::gui
};
} // namespace lmms::gui
#endif
#endif // MIXER_CHANNEL_VIEW_H