Changeset View
Changeset View
Standalone View
Standalone View
daemon/powerdevilbrightnesslogic.cpp
Context not available. | |||||
56 | int BrightnessLogic::increased() const | 56 | int BrightnessLogic::increased() const | ||
---|---|---|---|---|---|
57 | { | 57 | { | ||
58 | if (m_value == m_valueMax) { | 58 | if (m_value == m_valueMax) { | ||
59 | return -1; // ignore, we are at the maximum | 59 | return m_valueMax; // we are at the maximum already | ||
60 | } | 60 | } | ||
61 | 61 | | |||
62 | // Add 1 and round upwards to the nearest step | 62 | // Add 1 and round upwards to the nearest step | ||
Context not available. | |||||
74 | int BrightnessLogic::decreased() const | 74 | int BrightnessLogic::decreased() const | ||
75 | { | 75 | { | ||
76 | if (m_value == 0) { | 76 | if (m_value == 0) { | ||
77 | return -1; // ignore, we are at the minimum | 77 | return 0; // we are at the minimum already | ||
78 | } | 78 | } | ||
79 | 79 | | |||
80 | // Subtract 1 and round downwards to the nearest Step | 80 | // Subtract 1 and round downwards to the nearest Step | ||
Context not available. |