Implement overall limit sliders

This commit is contained in:
BlackMark 2020-07-17 16:15:52 +02:00
parent 78f3daf1ff
commit 8f4dec0bff

View File

@ -127,6 +127,19 @@ void MainWindow::setupMonitorsTab()
qDebug(ltr("Overriding brightness with %1").arg(newBrightness));
m_brightness = newBrightness;
});
connect(m_ui.monitorOverallMinBrightnessSlider, &QSlider::valueChanged, [this](int value) {
m_ui.monitorOverallMinBrightnessValueLabel->setText(tr("%1%").arg(value, 3));
if(value > m_ui.monitorOverallMaxBrightnessSlider->value()) {
m_ui.monitorOverallMaxBrightnessSlider->setValue(value);
}
});
connect(m_ui.monitorOverallMaxBrightnessSlider, &QSlider::valueChanged, [this](int value) {
m_ui.monitorOverallMaxBrightnessValueLabel->setText(tr("%1%").arg(value, 3));
if(value < m_ui.monitorOverallMinBrightnessSlider->value()) {
m_ui.monitorOverallMinBrightnessSlider->setValue(value);
}
});
}
void MainWindow::setupTrayIcon()