Skip to content

Commit

Permalink
add: style
Browse files Browse the repository at this point in the history
  • Loading branch information
onatbas committed Dec 23, 2023
1 parent f1e80ee commit 64d2b6c
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/nickelnote.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,14 @@ extern "C" __attribute__((visibility("default"))) PinInputDialog* _pinCodeInputD

auto view = pinInputConstructor(_this);
QFile file(NICKEL_NOTE_PIN_TEMPLATE_FILE);
if (file.open(QIODevice::ReadOnly | QIODevice::Text))
{
if (file.open(QIODevice::ReadOnly | QIODevice::Text)){
QTextStream in(&file);
QString richText = in.readAll();
file.close();

if (view)
{
if (view){
QWidget *forgotPin = view->findChild<QWidget *>("lblForgotPin");
if (forgotPin)
{
if (forgotPin){
QLabel *label = new QLabel(richText);
label->setAlignment(Qt::AlignCenter);
forgotPin->parentWidget()->layout()->replaceWidget(forgotPin, label);
Expand All @@ -60,8 +57,7 @@ extern "C" __attribute__((visibility("default"))) PinInputDialog* _pinCodeInputD
}

QWidget *signout = view->findChild<QWidget *>("lblSignOut");
if (signout)
{
if (signout){
signout->setParent(nullptr);
delete signout;
}
Expand Down

0 comments on commit 64d2b6c

Please sign in to comment.