OMOTE/Platformio/OmoteUI/UIs/BasicRefactored/page/DisplaySettings.cpp
MatthewColvin c7f9482e0a Create Base Implementation of OnShow and OnHide that notify all owned elements of their shown status
Update OnShow and OnHide to be aware of current set visibility.
2023-10-12 18:40:07 -05:00

15 lines
530 B
C++

#include "DisplaySettings.hpp"
#include "BrightnessSlider.hpp"
using namespace UI::Page;
DisplaySettings::DisplaySettings(std::shared_ptr<DisplayAbstract> aDisplay)
: Base(UI::ID::Pages::DisplaySettings), mDisplay(aDisplay),
mBrightnessSlider(AddElement<Widget::BrightnessSlider>(
std::make_unique<Widget::BrightnessSlider>(mDisplay))) {
SetBgColor(Color::GREY);
mBrightnessSlider->SetWidth(GetContentWidth());
mBrightnessSlider->SetHeight(80);
mBrightnessSlider->AlignTo(this, LV_ALIGN_TOP_MID);
}