From 989234cf460a38c7db003c73355a700487a5a01c Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Fri, 26 Feb 2021 23:40:24 +0300 Subject: [PATCH 1/4] set default .css behavior to match established convention --- src/aoapplication.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/aoapplication.cpp b/src/aoapplication.cpp index 34afb28..0084538 100644 --- a/src/aoapplication.cpp +++ b/src/aoapplication.cpp @@ -18,6 +18,7 @@ AOApplication::AOApplication(int &argc, char **argv) : QApplication(argc, argv) discord = new AttorneyOnline::Discord(); QObject::connect(net_manager, SIGNAL(ms_connect_finished(bool, bool)), SLOT(ms_connect_finished(bool, bool))); + qApp->setStyleSheet("QFrame {background-color:transparent;} QAbstractItemView {background-color: transparent; color: black;}; QLineEdit {background-color:transparent;}"); } AOApplication::~AOApplication() From 71ceb758b96e271cb4b9bd15982201a02aef38a5 Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Sun, 28 Feb 2021 21:03:02 +0300 Subject: [PATCH 2/4] Fix stickers settings option not being saved --- src/aooptionsdialog.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/aooptionsdialog.cpp b/src/aooptionsdialog.cpp index 9ca0865..ce8e4ae 100644 --- a/src/aooptionsdialog.cpp +++ b/src/aooptionsdialog.cpp @@ -981,6 +981,7 @@ void AOOptionsDialog::save_pressed() configini->setValue("stickyeffects", ui_stickyeffects_cb->isChecked()); configini->setValue("stickypres", ui_stickypres_cb->isChecked()); configini->setValue("customchat", ui_customchat_cb->isChecked()); + configini->setValue("sticker", ui_sticker_cb->isChecked()); configini->setValue("automatic_logging_enabled", ui_log_cb->isChecked()); configini->setValue("continuous_playback", ui_continuous_cb->isChecked()); configini->setValue("category_stop", ui_category_stop_cb->isChecked()); From 113529450dfbe52f6c224e3115abf114f03cab76 Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Sun, 28 Feb 2021 21:04:47 +0300 Subject: [PATCH 3/4] Stop parenting qMesageBoxes to the courtroom (fixes stylesheet conflicts) --- src/evidence.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/evidence.cpp b/src/evidence.cpp index 8825753..ec1fa7e 100644 --- a/src/evidence.cpp +++ b/src/evidence.cpp @@ -256,7 +256,7 @@ void Courtroom::set_evidence_list(QVector &p_evi_list) else if (compare_evidence_changed( old_list.at(current_evidence), local_evidence_list.at(current_evidence))) { - QMessageBox *msgBox = new QMessageBox(this); + QMessageBox *msgBox = new QMessageBox; msgBox->setAttribute(Qt::WA_DeleteOnClose); msgBox->setText(tr("The piece of evidence you've been editing has changed.")); @@ -551,7 +551,7 @@ void Courtroom::on_evidence_x_clicked() evidence_close(); return; } - QMessageBox *msgBox = new QMessageBox(this); + QMessageBox *msgBox = new QMessageBox; msgBox->setAttribute(Qt::WA_DeleteOnClose); msgBox->setText(tr("Evidence has been modified.")); msgBox->setInformativeText(tr("Do you want to save your changes?")); @@ -655,7 +655,7 @@ void Courtroom::on_evidence_transfer_clicked() private_evidence_list.append(f_evi); } - QMessageBox *msgBox = new QMessageBox(this); + QMessageBox *msgBox = new QMessageBox; msgBox->setAttribute(Qt::WA_DeleteOnClose); msgBox->setText(tr("\"%1\" has been transferred.").arg(name)); msgBox->setStandardButtons(QMessageBox::Ok); From 1bb93cb7c02a726c3ff37ceffbd500faf0cc69f3 Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Sun, 28 Feb 2021 21:23:26 +0300 Subject: [PATCH 4/4] Fix wrong pos being picked/displayed (most likely wit) if current_side is blank (a.k.a. use character default side) --- src/courtroom.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/courtroom.cpp b/src/courtroom.cpp index c8d8320..17da752 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -1256,9 +1256,12 @@ void Courtroom::set_background(QString p_background, bool display) ui_vp_evidence_display->reset(); ui_vp_background->kill(); ui_vp_desk->kill(); + QString f_side = current_side; + if (current_side == "") + f_side = ao_app->get_char_side(current_char); set_scene( QString::number(ao_app->get_desk_mod(current_char, current_emote)), - current_side); + f_side); } } @@ -1318,7 +1321,6 @@ void Courtroom::set_pos_dropdown(QStringList pos_dropdowns) // Unblock the signals so the element can be used for setting pos again ui_pos_dropdown->blockSignals(false); - // Don't block the signals when setting side set_side(current_side); }