mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
* Added backlight settings * Changed location of the brightness setting * Fix row size of brightness settings * [apps/settings/brightness] Update translations * Fix dimmer * Update translations * [apps/settings] Add dimmer duration setting * [apps/settings] Ensure of the brightness level is greater than the dimmed brightness level * Make transition smooth * Removed transition time setting I personally think that this setting is completely useless except if you absolutely want a transition that is not smooth, which is weird. * Moved everything related to brightness in one submenu * Some refactoring * Update defaults * Removed unnecessary translation * [apps/settings] Fix Shift + Minus/Plus in settings * Apply suggestions from code review * [apps/shared] Remove a think that I don't know what it is * Apply review suggestions Co-authored-by: Joachim LF <joachimlf@pm.me> Co-authored-by: lolocomotive <lolocomotive181@gmail.com>
34 lines
1.4 KiB
C++
34 lines
1.4 KiB
C++
#ifndef SETTINGS_BRIGHTNESS_CONTROLLER_H
|
|
#define SETTINGS_BRIGHTNESS_CONTROLLER_H
|
|
|
|
#include "generic_sub_controller.h"
|
|
#include "preferences_controller.h"
|
|
#include "../message_table_cell_with_editable_text_with_separator.h"
|
|
#include "../../shared/parameter_text_field_delegate.h"
|
|
#include "../message_table_cell_with_gauge_with_separator.h"
|
|
|
|
namespace Settings {
|
|
|
|
class BrightnessController : public GenericSubController, public Shared::ParameterTextFieldDelegate {
|
|
public:
|
|
BrightnessController(Responder * parentResponder, InputEventHandlerDelegate * inputEventHandlerDelegate);
|
|
TELEMETRY_ID("BrightnessSettings");
|
|
HighlightCell * reusableCell(int index, int type) override;
|
|
int reusableCellCount(int type) override;
|
|
void willDisplayCellForIndex(HighlightCell * cell, int index) override;
|
|
bool handleEvent(Ion::Events::Event event) override;
|
|
bool textFieldShouldFinishEditing(TextField * textField, Ion::Events::Event event) override;
|
|
bool textFieldDidFinishEditing(TextField * textField, const char * text, Ion::Events::Event event) override;
|
|
protected:
|
|
constexpr static int k_totalNumberOfCell = 4;
|
|
private:
|
|
MessageTableCellWithGauge m_brightnessCell;
|
|
MessageTableCellWithEditableText m_editableCellIdleBeforeDimmingSeconds;
|
|
MessageTableCellWithEditableText m_editableCellIdleBeforeSuspendSeconds;
|
|
MessageTableCellWithEditableText m_BrightnessShortcutCell;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|