aboutsummaryrefslogtreecommitdiff
path: root/text_file_functions.cpp
diff options
context:
space:
mode:
authorCerapter <cerap@protonmail.com>2018-12-12 18:54:50 +0100
committerCerapter <cerap@protonmail.com>2018-12-12 18:54:50 +0100
commit1dcdb0f5d8fd350f7863842035e4c8842cd035ce (patch)
treef7294dd8a0c46711d18e62b35da5732bd829d1d2 /text_file_functions.cpp
parent9270069e726d1f260e3c08ee5722f6d07067b770 (diff)
Added defaults to the inline colouring system.
Diffstat (limited to 'text_file_functions.cpp')
-rw-r--r--text_file_functions.cpp39
1 files changed, 38 insertions, 1 deletions
diff --git a/text_file_functions.cpp b/text_file_functions.cpp
index ff40c9c4..afe8fc30 100644
--- a/text_file_functions.cpp
+++ b/text_file_functions.cpp
@@ -268,12 +268,49 @@ QColor AOApplication::get_color(QString p_identifier, QString p_file)
QColor AOApplication::get_chat_color(QString p_identifier, QString p_chat)
{
+ QColor return_color(255, 255, 255);
+
+ if (p_identifier == "_inline_grey")
+ {
+ return_color = QColor(187, 187, 187);
+ }
+ else
+ {
+ switch (p_identifier.toInt()) {
+ case 1:
+ return_color = QColor(0, 255, 0);
+ break;
+ case 2:
+ return_color = QColor(255, 0, 0);
+ break;
+ case 3:
+ return_color = QColor(255, 165, 0);
+ break;
+ case 4:
+ return_color = QColor(45, 150, 255);
+ break;
+ case 5:
+ return_color = QColor(255, 255, 0);
+ break;
+ case 7:
+ return_color = QColor(255, 192, 203);
+ break;
+ case 8:
+ return_color = QColor(0, 255, 255);
+ break;
+ case 0:
+ case 6: // 6 is rainbow.
+ default:
+ return_color = QColor(255, 255, 255);
+ break;
+ }
+ }
+
p_identifier = p_identifier.prepend("c");
QString design_ini_path = get_base_path() + "misc/" + p_chat + "/config.ini";
QString default_path = get_base_path() + "misc/default/config.ini";
QString f_result = read_design_ini(p_identifier, design_ini_path);
- QColor return_color(255, 255, 255);
if (f_result == "")
{
f_result = read_design_ini(p_identifier, default_path);