mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 05:52:31 +02:00
Fix audio stats dialog not being sized properly
This commit is contained in:
parent
170725418b
commit
4cb5ccab90
1 changed files with 3 additions and 5 deletions
|
@ -65,11 +65,12 @@ AudioStatsDialog::AudioStatsDialog(QWidget* parent) :
|
||||||
// Get statistics from the Audio Client
|
// Get statistics from the Audio Client
|
||||||
_stats = &DependencyManager::get<AudioClient>()->getStats();
|
_stats = &DependencyManager::get<AudioClient>()->getStats();
|
||||||
|
|
||||||
// Create layouter
|
// Create layout
|
||||||
_form = new QFormLayout();
|
_form = new QFormLayout();
|
||||||
|
_form->setSizeConstraint(QLayout::SetFixedSize);
|
||||||
QDialog::setLayout(_form);
|
QDialog::setLayout(_form);
|
||||||
|
|
||||||
// Load and initilize all channels
|
// Load and initialize all channels
|
||||||
renderStats();
|
renderStats();
|
||||||
|
|
||||||
_audioDisplayChannels = QVector<QVector<AudioStatsDisplay*>>(1);
|
_audioDisplayChannels = QVector<QVector<AudioStatsDisplay*>>(1);
|
||||||
|
@ -80,10 +81,8 @@ AudioStatsDialog::AudioStatsDialog(QWidget* parent) :
|
||||||
_downstreamID = addChannel(_form, _downstreamStats, COLOR3);
|
_downstreamID = addChannel(_form, _downstreamStats, COLOR3);
|
||||||
_upstreamInjectedID = addChannel(_form, _upstreamInjectedStats, COLOR0);
|
_upstreamInjectedID = addChannel(_form, _upstreamInjectedStats, COLOR0);
|
||||||
|
|
||||||
|
|
||||||
connect(averageUpdateTimer, SIGNAL(timeout()), this, SLOT(updateTimerTimeout()));
|
connect(averageUpdateTimer, SIGNAL(timeout()), this, SLOT(updateTimerTimeout()));
|
||||||
averageUpdateTimer->start(1000);
|
averageUpdateTimer->start(1000);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int AudioStatsDialog::addChannel(QFormLayout* form, QVector<QString>& stats, const unsigned color) {
|
int AudioStatsDialog::addChannel(QFormLayout* form, QVector<QString>& stats, const unsigned color) {
|
||||||
|
@ -243,7 +242,6 @@ void AudioStatsDialog::paintEvent(QPaintEvent* event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
QDialog::paintEvent(event);
|
QDialog::paintEvent(event);
|
||||||
setFixedSize(width(), height());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudioStatsDialog::reject() {
|
void AudioStatsDialog::reject() {
|
||||||
|
|
Loading…
Reference in a new issue