Merge pull request #4819 from cebem1nt/master

fix: backlight/slider fix rounding issue on scroll up
This commit is contained in:
Alexis Rouillard
2026-02-06 19:10:58 +01:00
committed by GitHub

View File

@ -273,7 +273,7 @@ int BacklightBackend::get_scaled_brightness(const std::string& preferred_device)
GET_BEST_DEVICE(best, (*this), preferred_device); GET_BEST_DEVICE(best, (*this), preferred_device);
if (best != nullptr) { if (best != nullptr) {
return best->get_actual() * 100 / best->get_max(); return static_cast<int>(std::round(best->get_actual() * 100.0F / best->get_max()));
} }
return 0; return 0;