Skip to content

Commit

Permalink
upper voice chat button (#1255)
Browse files Browse the repository at this point in the history
* upper voice chat button

* fixing voice chat colors

Co-authored-by: jonjamcam <[email protected]>
  • Loading branch information
jonjamcam and jonjamcam authored Apr 10, 2020
1 parent a4defcd commit 1b31eeb
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 21 deletions.
22 changes: 10 additions & 12 deletions src/Common/gui/LocalTrackGroupView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,18 @@ LocalTrackGroupView::LocalTrackGroupView(int channelIndex, MainWindow *mainWindo


toolButton = createToolButton();
topPanelLayout->addWidget(toolButton, 0, Qt::AlignTop | Qt::AlignRight);

voiceChatButton = createVoiceChatButton();

toolVoiceChatLayout = new QBoxLayout(QBoxLayout::TopToBottom);
toolVoiceChatLayout->setContentsMargins(5, 5, 5, 5);
toolVoiceChatLayout->setSpacing(5);
toolVoiceChatLayout->addWidget(toolButton, 0, Qt::AlignTop | Qt::AlignCenter);
toolVoiceChatLayout->addWidget(voiceChatButton, 0, Qt::AlignBottom | Qt::AlignRight);
topPanelLayout->addLayout(toolVoiceChatLayout);

xmitButton = createXmitButton();
layout()->addWidget(xmitButton);

xmitVoiceChatLayout = new QBoxLayout(QBoxLayout::LeftToRight);
xmitVoiceChatLayout->setContentsMargins(0, 0, 0, 0);
xmitVoiceChatLayout->setSpacing(2);
xmitVoiceChatLayout->addWidget(xmitButton);
xmitVoiceChatLayout->addWidget(voiceChatButton);
mainLayout->addLayout(xmitVoiceChatLayout, mainLayout->rowCount(), 0);

connect(toolButton, &QPushButton::clicked, this, &LocalTrackGroupView::showMenu);

Expand Down Expand Up @@ -468,16 +468,14 @@ void LocalTrackGroupView::setPeakMeterMode(bool peakMeterOnly)
{
if (this->peakMeterOnly != peakMeterOnly) {
this->peakMeterOnly = peakMeterOnly;
topPanel->setVisible(!peakMeterOnly);

instrumentsButton->setVisible(topPanel->isVisible());
toolButton->setVisible(!peakMeterOnly);
instrumentsButton->setVisible(!peakMeterOnly);

for (auto view : getTracks<LocalTrackView *>()) {
view->setPeakMetersOnlyMode(peakMeterOnly);
}

xmitVoiceChatLayout->setDirection(peakMeterOnly ? QBoxLayout::BottomToTop : QBoxLayout::LeftToRight);

updateXmitButtonText();
updateGeometry();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Common/gui/LocalTrackGroupView.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class LocalTrackGroupView : public TrackGroupView
void setInstrumentIcon(int instrumentIndex);
int getInstrumentIcon() const;

QBoxLayout *xmitVoiceChatLayout;
QBoxLayout *toolVoiceChatLayout;

protected:

Expand Down
4 changes: 2 additions & 2 deletions src/resources/css/themes/Flat/LocalTrack.css
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,12 @@ LocalTrackView #inputPanel:hover

#voiceChatButton:!checked
{
background-color: rgba(0, 0, 0, 55)
background-color: rgba(100, 100, 100, 55);
}

#voiceChatButton:hover
{
background-color: rgba(40, 40, 40, 55);
background-color: rgba(160, 160, 160, 55);
}

LocalTrackView #buttonLooper:disabled
Expand Down
7 changes: 4 additions & 3 deletions src/resources/css/themes/Game_nm/LocalTrack.css
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,10 @@ LocalTrackViewStandalone
#voiceChatButton:!checked,
#voiceChatButton:checked
{
background-color: #58A9AA;
border-color: rgb(0, 110, 100);
color: rgb(0, 60, 60);
border-image: url('/images/button_checked.png') 7px 8px 7px 7px;
color: green;
background-color: none;

}

#voiceChatButton:hover
Expand Down
6 changes: 3 additions & 3 deletions src/resources/css/themes/Ice/LocalTrack.css
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,14 @@ LocalTrackView[unlighted="true"] #inputPanel:hover

#voiceChatButton:!checked
{
background-color: rgb(136, 174, 255);
background-color: rgba(180, 207, 250, 60);
border: 1px outset rgba(0, 0, 140, 120, 60);
border-radius: 6px;
}

#voiceChatButton:hover
{
background-color: rgb(155, 188, 255);
border-radius: 6px;
background-color: rgba(207, 224, 252, 60);
}

LocalTrackView #buttonLooper:disabled
Expand Down

0 comments on commit 1b31eeb

Please sign in to comment.