mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
GroupChatRoom: use constants for colors
This commit is contained in:
committed by
Dan Caseley
parent
6294835844
commit
2aac6dfece
@ -68,6 +68,10 @@ import java.util.regex.Pattern;
|
||||
*/
|
||||
public class GroupChatRoom extends ChatRoom
|
||||
{
|
||||
private static final Color COLOR_HIGHLIGHT_MINE_BG = new Color(244, 248, 255);
|
||||
private static final Color COLOR_HIGHLIGHT_MENTION_BG = new Color(255, 255, 153);
|
||||
private static final Color COLOR_ALPHA = new Color(0, 0, 0, 0);
|
||||
|
||||
private final LocalPreferences pref = SettingsManager.getLocalPreferences();
|
||||
private final MultiUserChat chat;
|
||||
private final SubjectPanel subjectPanel;
|
||||
@ -382,15 +386,15 @@ public class GroupChatRoom extends ChatRoom
|
||||
// Should we even highlight this packet?
|
||||
if ( pref.isMucHighNameEnabled() && myNickName.equals( nickname ) )
|
||||
{
|
||||
return new Color( 244, 248, 255 );
|
||||
return COLOR_HIGHLIGHT_MINE_BG;
|
||||
}
|
||||
else if ( pref.isMucHighTextEnabled() && ( usernameMatch.matcher( body ).find() || nicknameMatch.matcher( body ).find() ) )
|
||||
{
|
||||
return new Color( 255, 255, 153 );
|
||||
return COLOR_HIGHLIGHT_MENTION_BG;
|
||||
}
|
||||
else
|
||||
{
|
||||
return new Color( 0, 0, 0, 0 );
|
||||
return COLOR_ALPHA;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user