mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-14 16:07:01 +02:00
Merge pull request #6218 from ctrlaltdavid/20719
20719 Fix audio stats dialog box not being sized properly
This commit is contained in:
commit
21decaaf8e
2 changed files with 5 additions and 7 deletions
|
@ -65,11 +65,12 @@ AudioStatsDialog::AudioStatsDialog(QWidget* parent) :
|
|||
// Get statistics from the Audio Client
|
||||
_stats = &DependencyManager::get<AudioClient>()->getStats();
|
||||
|
||||
// Create layouter
|
||||
// Create layout
|
||||
_form = new QFormLayout();
|
||||
_form->setSizeConstraint(QLayout::SetFixedSize);
|
||||
QDialog::setLayout(_form);
|
||||
|
||||
// Load and initilize all channels
|
||||
// Load and initialize all channels
|
||||
renderStats();
|
||||
|
||||
_audioDisplayChannels = QVector<QVector<AudioStatsDisplay*>>(1);
|
||||
|
@ -80,10 +81,8 @@ AudioStatsDialog::AudioStatsDialog(QWidget* parent) :
|
|||
_downstreamID = addChannel(_form, _downstreamStats, COLOR3);
|
||||
_upstreamInjectedID = addChannel(_form, _upstreamInjectedStats, COLOR0);
|
||||
|
||||
|
||||
connect(averageUpdateTimer, SIGNAL(timeout()), this, SLOT(updateTimerTimeout()));
|
||||
averageUpdateTimer->start(1000);
|
||||
|
||||
}
|
||||
|
||||
int AudioStatsDialog::addChannel(QFormLayout* form, QVector<QString>& stats, const unsigned color) {
|
||||
|
@ -243,7 +242,6 @@ void AudioStatsDialog::paintEvent(QPaintEvent* event) {
|
|||
}
|
||||
|
||||
QDialog::paintEvent(event);
|
||||
setFixedSize(width(), height());
|
||||
}
|
||||
|
||||
void AudioStatsDialog::reject() {
|
||||
|
|
|
@ -72,8 +72,9 @@ BandwidthDialog::BandwidthDialog(QWidget* parent) :
|
|||
|
||||
this->setWindowTitle("Bandwidth Details");
|
||||
|
||||
// Create layouter
|
||||
// Create layout
|
||||
QFormLayout* form = new QFormLayout();
|
||||
form->setSizeConstraint(QLayout::SetFixedSize);
|
||||
this->QDialog::setLayout(form);
|
||||
|
||||
QSharedPointer<BandwidthRecorder> bandwidthRecorder = DependencyManager::get<BandwidthRecorder>();
|
||||
|
@ -118,7 +119,6 @@ void BandwidthDialog::paintEvent(QPaintEvent* event) {
|
|||
for (unsigned int i=0; i<_CHANNELCOUNT; i++)
|
||||
_allChannelDisplays[i]->paint();
|
||||
this->QDialog::paintEvent(event);
|
||||
this->setFixedSize(this->width(), this->height());
|
||||
}
|
||||
|
||||
void BandwidthDialog::reject() {
|
||||
|
|
Loading…
Reference in a new issue