From 923548c99746858846764e47fa96899e7c5ef2ab Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Wed, 25 Sep 2019 02:05:52 +0300 Subject: Hellcommit of doom and suffering Create two new helper functions - get_chat_markdown and remake read_char_ini_tag to be read_ini_tags for more general purpose Modify aolineedit to support preserving selection after unfocusing (building this for using dropdown list for setting colors), as well as remove the setReadOnly functionality and use it in signals instead Overhaul the color system to get rid of inline colors, allow full customization of colors and usage of configuration files for every facet of how a color functions (should we be talking, should we remove that markdown char, etc.) Complete overhaul of color markdowns system TODO: Make this thing not lag to hell, fix chat messages hogging the IC as the animation never ends apparently --- src/evidence.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/evidence.cpp') diff --git a/src/evidence.cpp b/src/evidence.cpp index b04a9d60..dfbc675f 100644 --- a/src/evidence.cpp +++ b/src/evidence.cpp @@ -26,7 +26,7 @@ void Courtroom::initialize_evidence() ui_evidence_description->setStyleSheet("background-color: rgba(0, 0, 0, 0);" "color: white;"); - connect(ui_evidence_name, SIGNAL(textEdited(QString)), this, SLOT(on_evidence_name_edited(QString))); + connect(ui_evidence_name, SIGNAL(returnPressed()), this, SLOT(on_evidence_name_edited())); connect(ui_evidence_name, SIGNAL(double_clicked()), this, SLOT(on_evidence_name_double_clicked())); connect(ui_evidence_left, SIGNAL(clicked()), this, SLOT(on_evidence_left_clicked())); connect(ui_evidence_right, SIGNAL(clicked()), this, SLOT(on_evidence_right_clicked())); @@ -179,8 +179,9 @@ void Courtroom::set_evidence_page() } } -void Courtroom::on_evidence_name_edited(QString text) +void Courtroom::on_evidence_name_edited() { + ui_evidence_name->setReadOnly(true); if (current_evidence >= local_evidence_list.size()) return; @@ -206,6 +207,7 @@ void Courtroom::on_evidence_name_double_clicked() void Courtroom::on_evidence_image_name_edited() { + ui_evidence_image_name->setReadOnly(true); if (current_evidence >= local_evidence_list.size()) return; -- cgit