Added defaults to the inline colouring system.
This commit is contained in:
parent
9270069e72
commit
1dcdb0f5d8
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user