wip: dynamically updated endpoint name

This commit is contained in:
Hane 2024-04-19 18:58:26 +02:00
commit 1b2ab191ca
5 changed files with 55 additions and 29 deletions

View file

@ -420,6 +420,11 @@ EndpointWidget::EndpointWidget(EndpointHandler* eph, QWidget *parent, uint64_t i
//if (memcmp(osh->callbackInfo[idx]->caller, osh->getGuid(), sizeof(NGuid)) == 0) return; CHECK IF THIS PROGRAM GENERATED THE FUNSIES IS NO LONGER IN USE FOR NOW.
//todo: global + constexpr + ratio
const float roundingFactor = 0.005;
if (eph->getCallbackInfo()->updateName) {
eph->getCallbackInfo()->updateName = false;
mainLabel->setText(QString::fromStdWString(eph->getName()));
mainLabel->setMinimumHeight(mainLabel->sizeHint().height());
}
mainSlider->blockSignals(true);
muteButton->blockSignals(true);
mainSlider->setValue((int)((eph->getCallbackInfo()->mainVolume + roundingFactor) * 100));