From 17fdd9b0ca097b3f8732e0b8b1a66b2a9bc3767c Mon Sep 17 00:00:00 2001 From: urnenfeld Date: Fri, 28 May 2010 23:05:57 +0000 Subject: [PATCH] Align Status in chat window Clean the status when a message is received --- application/ChatWindow.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/application/ChatWindow.cpp b/application/ChatWindow.cpp index 211c619..1c0d404 100644 --- a/application/ChatWindow.cpp +++ b/application/ChatWindow.cpp @@ -51,6 +51,7 @@ ChatWindow::ChatWindow(ContactLinker* cl) fSendView->MakeFocus(true); fStatus = new BStringView("status", ""); + fStatus->SetExplicitAlignment(BAlignment(B_ALIGN_LEFT, B_ALIGN_MIDDLE)); SetLayout(new BGroupLayout(B_HORIZONTAL)); @@ -117,6 +118,8 @@ ChatWindow::ImMessage(BMessage* msg) { BString message = msg->FindString("body"); fReceiveView->AppendOtherMessage(message.String()); + // Message received, clear status anyway + fStatus->SetText(" "); break; } case IM_CONTACT_STARTED_TYPING: @@ -124,7 +127,7 @@ ChatWindow::ImMessage(BMessage* msg) break; case IM_CONTACT_STOPPED_TYPING: - fStatus->SetText(""); + fStatus->SetText(" "); break; default: