mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-04-20 23:17:35 -04:00
Refactored LockWindow TitleBar handling. Added Sim pin request block on lockedPhone. Added Sim info popup added when pin changed. Updated assets. Removed old PinLock structures. Cleared LockBox structures. Removed old settings sim setters. New CellularMessage adaptation. Cleared Lock structure.
48 lines
1.2 KiB
C++
48 lines
1.2 KiB
C++
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#include "Lock.hpp"
|
|
#include "LockBoxAlternatingSize.hpp"
|
|
|
|
#include <locks/data/LockStyle.hpp>
|
|
#include <locks/windows/LockInputWindow.hpp>
|
|
|
|
namespace gui
|
|
{
|
|
void LockBoxAlternatingSize::buildLockBox(unsigned int pinSize)
|
|
{
|
|
buildPinLabels(0);
|
|
}
|
|
|
|
void LockBoxAlternatingSize::clear()
|
|
{
|
|
lockWindow->pinLabelsBox->erase();
|
|
buildPinLabels(0);
|
|
}
|
|
|
|
void LockBoxAlternatingSize::popChar(unsigned int charNum)
|
|
{
|
|
buildPinLabels(charNum);
|
|
}
|
|
|
|
void LockBoxAlternatingSize::putChar(unsigned int charNum)
|
|
{
|
|
buildPinLabels(charNum + 1);
|
|
}
|
|
|
|
void LockBoxAlternatingSize::buildPinLabels(unsigned int pinSize)
|
|
{
|
|
if (lockWindow->pinLabelsBox) {
|
|
lockWindow->pinLabelsBox->erase();
|
|
}
|
|
|
|
auto itemBuilder = []() {
|
|
auto label = new gui::Image("dot_12px_hard_alpha_W_G");
|
|
return label;
|
|
};
|
|
|
|
lockWindow->buildPinLabels(itemBuilder, pinSize);
|
|
lockWindow->pinLabelsBox->setEdges(RectangleEdge::Bottom);
|
|
}
|
|
} // namespace gui
|