OMOTE/Platformio/OmoteUI/UIs/BasicRefactored/page/DisplaySettings.cpp

17 lines
551 B
C++
Raw Normal View History

2023-10-22 14:35:49 -04:00
#include "DisplaySettings.hpp"
#include "BrightnessSlider.hpp"
#include "Label.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);
}