-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
plugin-backlight: Global shortcuts. #1785
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The shortcuts are registered correctly. I chose Ctrl+Alt+Up/Down
and the backlight was changed by using the shortcuts without problem.
But there's a regression: the backlight change became unnatural here, whether by using the slider or by pressing the shortcuts. Previously, it was increased and decreased correctly; after this patch, the backlight suddenly decreased when the slider was only at the middle, so that the screen became black. I think the changes in SliderDialog::sliderValueChanged()
are the cause.
As for the code:
- The static function
SliderDialog::setBacklight()
is only used bySliderDialog::sliderValueChanged()
. I suggest removing it and putting its contents insideSliderDialog::sliderValueChanged()
(after correcting them -- see above). - I think
Q_SLOTS
was used intentionally, instead ofslots
.
IMHO visual notifications about backlight changes are quite redundant as it is immediately noticeable, it wastes users attention. |
Finally, I a notification is used to show the backlight change. The slide is not divided is steps, then it is possible to set the backlight with more precisely. Thanks |
@stefonarch I can remove notifications, if you want. :-) |
IMHO it's better without, thanks! |
@tsujan Does the code need more changes to be GTM? Thanks |
@selairi |
Again, very sorry for the long delay! I've been really busy with coding I hope other devs will find time soon to review and test this PR. If not, I'll do it sometime before the next release. |
The original methods The new methods |
The backlight intensity is divided into steps. The number of steps of your hardware can be checked in "/sys/class/backlight/ * /max_brightness". The actual step is in "/sys/class/backlight/ * /brightness". Example, now my intel_backlight has max_brightness = 100 and brightness = 3.
Please, I will prefer to keep the actual implementation of LXQtBacklight::setBacklightStep 🙏 |
Global key shortcuts has been added for plugin-backlight.