From dfe2bfd6dee33debf9a8ac6f7fbc089579916374 Mon Sep 17 00:00:00 2001 From: Chad Pilkey Date: Mon, 9 Sep 2013 14:27:10 -0700 Subject: [PATCH] removed the colour change from the chat item renderer and improved the layout when there's a long name --- .../chat/views/ChatMessageRenderer.mxml | 26 ++++++------------- 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatMessageRenderer.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatMessageRenderer.mxml index 0317e71115..d63de7bec5 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatMessageRenderer.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatMessageRenderer.mxml @@ -21,7 +21,8 @@ with BigBlueButton; if not, see . --> @@ -72,19 +73,6 @@ with BigBlueButton; if not, see . data.translateMessage(); - /* - This is setting the backgroundColor style. It changes the value correct and the if - statement works, but the style never takes effect. I have no idea what's wrong. - Chad - */ - //LogUtil.debug ("senderId: " + data.senderId); - //LogUtil.debug("backColor " + this.getStyle("backgroundColor") + "alpha " + this.getStyle("backgroundAlpha")); - if (data.senderId == " ") { - this.setStyle("backgroundColor", 0xff0000); - } else { - this.setStyle("backgroundColor", 0x00ff00); - } - // The visibility check has to go here becasue ORs don't work with databinding lblTime.visible = (!(data.lastTime == data.time) || !(data.senderId == data.lastSenderId)); // check the visibility of the name as well because events might fire in different order @@ -93,6 +81,9 @@ with BigBlueButton; if not, see . //remove the header if not needed to save space hbHeader.includeInLayout = hbHeader.visible = lblName.visible || lblTime.visible; + // adjust the name width so that "..." are added if it's too long + lblName.width = this.width - lblTime.width - 22; + validateNow(); } @@ -108,11 +99,10 @@ with BigBlueButton; if not, see . - - + + visible="true" right="0" + color="gray"/>