Commit 4b8ae4d7 authored by Thomas Surrel's avatar Thomas Surrel Committed by Nate Graham
Browse files

Display brightness OSD even when min and max is reached

When the brightness is already at the maximum (or minimum) value,
hitting the keyboard shortcut to increase (resp. decrease) it does
not bring up the OSD, there is no visual feedback.
This is not consistent either with the volume which handles this

BUG: 387284
FIXED-IN: 5.14.0

Reviewers: ngraham, romangg

Reviewed By: ngraham, romangg

Subscribers: romangg, ngraham, broulik, plasma-devel

Tags: #plasma

Differential Revision:
parent 3734ab10
......@@ -56,7 +56,7 @@ int BrightnessLogic::action(BrightnessKeyType type) const {
int BrightnessLogic::increased() const
if (m_value == m_valueMax) {
return -1; // ignore, we are at the maximum
return m_valueMax; // we are at the maximum already
// Add 1 and round upwards to the nearest step
......@@ -74,7 +74,7 @@ int BrightnessLogic::increased() const
int BrightnessLogic::decreased() const
if (m_value == 0) {
return -1; // ignore, we are at the minimum
return 0; // we are at the minimum already
// Subtract 1 and round downwards to the nearest Step
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment