Skip to content

Add logarithmic brightness scaling

Eric Edlund requested to merge work/eric/brightness into master

I've created 2 new int wrappers: PerceivedBrightness and ActualBrightness. This provides type safety when dealing with brightness values. Unfortunately, it's not perfect because we use QVariants and ints in dbus, but it's helpful for the internals.

I've used Perceived = sqrt(actual) which I found on a pdf on the internet somewhere.

Something that needs discussion is that I accomplished this partly by lying to the dbus interface and handing out perceived brightness values instead of actual ones.

Someone needs to test this on a backlit keyboard because I can't. If it's not working, it's likely just a type safety thing that I missed and wasn't checked at compile time because of QVariant. If it's not working for this reason, it will be very obvious to anyone adjusting the brightness.

  • Verify backlit keyboard works

BUG: 448459

Edited by Nate Graham

Merge request reports