Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 85 additions & 32 deletions resources/styles/app.qss
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,12 @@ QPushButton[role="primary"]:pressed {
background-color: #007F86;
}

QPushButton[role="primary"]:disabled {
background-color: rgba(17, 179, 188, 0.24);
color: rgba(255, 255, 255, 0.55);
border: none;
}

QPushButton[role="danger"] {
background-color: #D9534F;
color: #FFFFFF;
Expand Down Expand Up @@ -513,55 +519,102 @@ QTextBrowser#infoDialogContent a {
color: #36C5CC;
}

QWizard[wizardTheme="slr"] * {
background-color: #2B2B2B;
color: #E0E0E0;
QDialog[guidedDialog="slr"] {
background-color: #1F1F1F;
border: none;
}

QWizard[wizardTheme="slr"] {
background-color: #1F1F1F;
color: #E0E0E0;
QDialog[guidedDialog="slr"] QFrame#slrWizardPanel {
background: transparent;
border: none;
border-radius: 0;
}

QWizard[wizardTheme="slr"] QWizardPage {
background-color: #1F1F1F;
color: #E0E0E0;
QDialog[guidedDialog="slr"] QLabel#slrWizardTitle {
color: #F4F7F8;
font-size: 28px;
font-weight: 700;
}

QWizard[wizardTheme="slr"] QWizard::title {
color: #FFFFFF;
font-size: 18px;
QDialog[guidedDialog="slr"] QLabel#slrWizardStepCounter {
color: #9AA5A8;
font-size: 12px;
font-weight: 600;
}

QWizard[wizardTheme="slr"] QLabel {
color: #E0E0E0;
QDialog[guidedDialog="slr"] QProgressBar#slrWizardProgress {
background-color: rgba(255, 255, 255, 0.05);
border: none;
border-radius: 2px;
}

QWizard[wizardTheme="slr"] QLabel#slrWizardFeedbackLabel {
color: #CCCCCC;
min-height: 20px;
QDialog[guidedDialog="slr"] QProgressBar#slrWizardProgress::chunk {
background-color: #11B3BC;
border-radius: 2px;
}

QWizard[wizardTheme="slr"] QLineEdit {
background-color: #3C3F41;
color: #E0E0E0;
border: 1px solid #555555;
border-radius: 4px;
padding: 4px;
QDialog[guidedDialog="slr"] QPushButton#slrWizardCloseButton {
background: transparent;
color: #AAB5B8;
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 8px;
padding: 6px 11px;
font-size: 12px;
font-weight: 600;
}

QWizard[wizardTheme="slr"] QWizard::WizardButton {
background-color: #444444;
QDialog[guidedDialog="slr"] QPushButton#slrWizardCloseButton:hover {
background-color: rgba(255, 255, 255, 0.03);
color: #FFFFFF;
border: none;
padding: 6px 12px;
border-radius: 4px;
border: 1px solid rgba(255, 255, 255, 0.12);
}

QDialog[guidedDialog="slr"] QPushButton#slrWizardCloseButton:pressed {
background-color: rgba(255, 255, 255, 0.06);
}

QDialog[guidedDialog="slr"] QLabel#slrWizardSectionTitle {
color: #9FCFD2;
font-size: 12px;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
}

QDialog[guidedDialog="slr"] QLabel#slrWizardExplanationLabel {
color: #DEE5E7;
font-size: 15px;
line-height: 1.5;
}

QDialog[guidedDialog="slr"] QLineEdit#slrWizardAnswerEdit {
background-color: #2B3133;
color: #F1F4F5;
border: 1px solid rgba(255, 255, 255, 0.10);
border-radius: 12px;
padding: 12px 14px;
font-size: 15px;
selection-background-color: #35515A;
}

QWizard[wizardTheme="slr"] QWizard::WizardButton:hover {
background-color: #555555;
QDialog[guidedDialog="slr"] QLineEdit#slrWizardAnswerEdit:focus {
border: 1px solid #11B3BC;
}

QWizard[wizardTheme="slr"] QWizard::WizardButton:pressed {
background-color: #333333;
QDialog[guidedDialog="slr"] QLabel#slrWizardFeedbackLabel {
color: #AEB9BC;
min-height: 40px;
padding-top: 2px;
}

QDialog[guidedDialog="slr"] QPushButton#slrWizardNextButton {
min-width: 136px;
padding: 11px 18px;
border-radius: 10px;
}

QDialog[guidedDialog="slr"] QPushButton#slrWizardNextButton:disabled {
background-color: #2A2E30;
color: #6F7A7E;
border: 1px solid #353D40;
}
5 changes: 5 additions & 0 deletions src/gui/slrtabledialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@ void SLRTableDialog::setInitialData(const QVector<QVector<QString>>& data) {
}
}

void SLRTableDialog::setGuidedModeActive(bool active) {
guidedButton->setEnabled(!active);
submitButton->setEnabled(!active);
}

void SLRTableDialog::highlightIncorrectCells(
const QList<QPair<int, int>>& coords) {
for (int r = 0; r < table->rowCount(); ++r) {
Expand Down
1 change: 1 addition & 0 deletions src/gui/slrtabledialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class SLRTableDialog : public QDialog {
* @param data 2D vector containing the table data to display.
*/
void setInitialData(const QVector<QVector<QString>>& data);
void setGuidedModeActive(bool active);

void highlightIncorrectCells(const QList<QPair<int, int>>& coords);
void highlightInvalidCells(const QList<QPair<int, int>>& coords);
Expand Down
5 changes: 3 additions & 2 deletions src/gui/slrtutorwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -599,12 +599,13 @@ void SLRTutorWindow::showTable() {
const QVector<QVector<QString>> snapshot = data;
auto* wizard = new SLRWizard(slr1, snapshot, colHeaders,
sortedGrammar, dialog);
wizard->setProperty("wizardTheme", "slr");
wizard->setAttribute(Qt::WA_DeleteOnClose);
wizard->setWindowModality(Qt::WindowModal);
dialog->setGuidedModeActive(true);

connect(wizard, &QWizard::finished, dialog,
connect(wizard, &QDialog::finished, dialog,
[dialog, snapshot](int) {
dialog->setGuidedModeActive(false);
dialog->setInitialData(snapshot);
});
wizard->show();
Expand Down
Loading
Loading