/me style is defined in chat styles

This commit is contained in:
hunbernd 2015-12-21 01:21:04 +01:00
parent 77804bbf16
commit 33b3eb7284
18 changed files with 32 additions and 19 deletions

View File

@ -367,12 +367,17 @@ QString ChatStyle::formatMessage(enumFormatMessage type, const QString &name, co
QString strShortName = RsHtml::plainText(name.left(bi)).prepend(QString("<a name=\"name\">")).append(QString("</a>"));
//handle /me
//%nome% and %me% for including formatting conditionally
//meName class for modifying the style of the name in the palce of /me
if(me){
messageBody = messageBody.replace(messageBody.indexOf("/me "), 3, strShortName); //replace only the first /me
strName = "*";
messageBody = messageBody.replace(messageBody.indexOf("/me "), 3, strShortName.prepend(QString("<span class=\"meName\">")).append(QString("</span>"))); //replace only the first /me
style = style.remove(QRegExp("%nome%.*%/nome%")).remove("%me%").remove("%/me%");
} else {
style = style.remove(QRegExp("%me%.*%/me%")).remove("%nome%").remove("%/nome%");
}
QString formatMsg = style.replace("%name%", strName)
.replace("%shortname%", strShortName)
.replace("%date%", strDate)
.replace("%time%", strTime)
#ifdef COLORED_NICKNAMES

View File

@ -27,8 +27,8 @@
<table class='bubbleFooter' width='100%'>
<tr>
<td align='right'>
<span width='130' align='right' class='time'>%time% - </span>
<span class='name'>%name%</span>
<span width='130' align='right' class='time'>%time%%nome% - %/nome%</span>
<span class='name'>%nome%%name%%/nome%</span>
</td>
</tr>
</table>

View File

@ -28,7 +28,7 @@
<table class='bubbleFooter' width='100%'>
<tr>
<td align='left'>
<span class='name'>&nbsp;&nbsp;%name% - </span>
<span class='name'>&nbsp;&nbsp;%nome%%name% - %/nome%</span>
<span width='130' align='right' class='time'>%time%</span>
</td>
</tr>

View File

@ -28,8 +28,8 @@
<table class='bubbleFooter' width='100%'>
<tr>
<td align='right'>
<span width='130' align='right' class='time'>%time% - </span>
<span class='name'>%name%</span>
<span width='130' align='right' class='time'>%time%%nome% - %/nome%</span>
<span class='name'>%nome%%name%%/nome%</span>
</td>
</tr>
</table>

View File

@ -28,7 +28,7 @@
<table class='bubbleFooter' width='100%'>
<tr>
<td align='left'>
<span class='name'>&nbsp;&nbsp;%name% - </span>
<span class='name'>&nbsp;&nbsp;%nome%%name% - %/nome%</span>
<span width='130' align='right' class='time'>%time%</span>
</td>
</tr>

View File

@ -28,7 +28,7 @@
<table class='bubbleFooter' width='100%'>
<tr>
<td align='left'>
<span class='name'>&nbsp;&nbsp;%name% - </span>
<span class='name'>&nbsp;&nbsp;%nome%%name% - %/nome%</span>
<span width='130' align='right' class='time'>%time%</span>
</td>
</tr>

View File

@ -3,5 +3,5 @@
</style>
<span class='hincomingTime'>%date% %time%</span>
<span class='name hincomingName'>%name%:</span>
<span class='name hincomingName'>%nome%%name%:%/nome%</span>
%message%

View File

@ -3,5 +3,5 @@
</style>
<span class='houtgoingTime'>%date% %time%</span>
<span class='name houtgoingName'>%name%:</span>
<span class='name houtgoingName'>%nome%%name%:%/nome%</span>
%message%

View File

@ -3,5 +3,5 @@
</style>
<span class='incomingTime'>%time%</span>
<span class='name incomingName'>%name%:</span>
<span class='name incomingName'>%nome%%name%:%/nome%</span>
%message%

View File

@ -25,3 +25,7 @@
.systemTime {
color:#808080;
}
.meName {
font-weight: bold;
}

View File

@ -3,5 +3,5 @@
</style>
<span class='ooutgoingTime'>%time%</span>
<span class='name ooutgoingName'>%name%:</span>
<span class='name ooutgoingName'>%nome%%name%:%/nome%</span>
%message%

View File

@ -3,5 +3,5 @@
</style>
<span class='outgoingTime'>%time%</span>
<span class='name outgoingName'>%name%:</span>
<span class='name outgoingName'>%nome%%name%:%/nome%</span>
%message%

View File

@ -3,5 +3,5 @@
</style>
<span class='hincomingTime'>%date% %time%</span>
<span class='name hincomingName'>%name%</span><br>
<span class='name hincomingName'>%nome%%name%%/nome%%me%*%/me%</span><br>
%message%

View File

@ -3,5 +3,5 @@
</style>
<span class='houtgoingTime'>%date% %time%</span>
<span class='name houtgoingName'>%name%</span><br>
<span class='name houtgoingName'>%nome%%name%%/nome%%me%*%/me%</span><br>
%message%

View File

@ -3,5 +3,5 @@
</style>
<span class='incomingTime'>%time%</span>
<span class='name incomingName'>%name%</span><br>
<span class='name incomingName'>%nome%%name%%/nome%%me%*%/me%</span><br>
%message%

View File

@ -47,3 +47,7 @@
.systemName {
}
.meName {
font-weight: bold;
}

View File

@ -3,5 +3,5 @@
</style>
<span class='ooutgoingTime'>%time%</span>
<span class='name ooutgoingName'>%name%</span><br>
<span class='name ooutgoingName'>%nome%%name%%/nome%%me%*%/me%</span><br>
%message%

View File

@ -3,5 +3,5 @@
</style>
<span class='outgoingTime'>%time%</span>
<span class='name outgoingName'>%name%</span><br>
<span class='name outgoingName'>%nome%%name%%/nome%%me%*%/me%</span><br>
%message%