diff --git a/AdaptiveBrightness/main_window.cpp b/AdaptiveBrightness/main_window.cpp index d836258..bbc9522 100644 --- a/AdaptiveBrightness/main_window.cpp +++ b/AdaptiveBrightness/main_window.cpp @@ -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()