From 9ee4510fa8a9280b26bf636be0c4d93f921b0eb7 Mon Sep 17 00:00:00 2001 From: Nicolas Mailloux Date: Wed, 27 Nov 2024 23:34:03 -0500 Subject: [PATCH] FlashExam: some fixes --- src/apps/apps.h | 1 - src/apps/flashexam.cpp | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/apps/apps.h b/src/apps/apps.h index 91b448b..2b66f3e 100644 --- a/src/apps/apps.h +++ b/src/apps/apps.h @@ -41,7 +41,6 @@ private slots: void updateJsonFileSlot(QJsonDocument jsonDocument); void showFailedToParseMainUserAppsJsonFile(); void on_todoLaunchBtn_clicked(); - void on_flashExamLaunchBtn_clicked(); private: diff --git a/src/apps/flashexam.cpp b/src/apps/flashexam.cpp index cb88f79..e21a20e 100644 --- a/src/apps/flashexam.cpp +++ b/src/apps/flashexam.cpp @@ -23,6 +23,7 @@ flashExam::flashExam(QWidget *parent) ui->revealBtn->setStyleSheet("padding: 20px; QPushButton[type='borderless']:pressed { background: black; color: white; border: none}"); ui->nextBtn->setStyleSheet("padding: 20px; QPushButton[type='borderless']:pressed { background: black; color: white; border: none}"); ui->backBtn->setStyleSheet("QPushButton[type='borderless']:pressed { background: black; color: white; border: none}"); + ui->textBrowser->setStyleSheet("font-size: 12pt"); ui->closeBtn->setIcon(QIcon(":/resources/close.png")); ui->backBtn->setIcon(QIcon(":/resources/arrow-left.png")); ui->randomizeCheckBox->click(); @@ -98,8 +99,6 @@ void flashExam::on_revealBtn_clicked() { if(answerShown) { displayCard(true); - answerShown = false; - ui->revealBtn->setText("Show answer"); } else { QString answerText = answersStringList.at(currentCardNumber); @@ -128,5 +127,8 @@ void flashExam::displayCard(bool existingCardNumber) { cardText.remove(0, 2); ui->cardNumberLabel->setText("Card " + QString::number(currentCardNumber + 1)); ui->textBrowser->setText(cardText); + + ui->revealBtn->setText("Show answer"); + answerShown = false; }