@@ -29,6 +29,8 @@
|
|||||||
#include <Roster.h>
|
#include <Roster.h>
|
||||||
#include <StatusBar.h>
|
#include <StatusBar.h>
|
||||||
|
|
||||||
|
#include <Notifications.h>
|
||||||
|
|
||||||
#include "AppGroupView.h"
|
#include "AppGroupView.h"
|
||||||
#include "NotificationWindow.h"
|
#include "NotificationWindow.h"
|
||||||
|
|
||||||
@@ -101,8 +103,6 @@ NotificationView::NotificationView(NotificationWindow* win,
|
|||||||
B_DARKEN_1_TINT);
|
B_DARKEN_1_TINT);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetText();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -121,6 +121,8 @@ NotificationView::~NotificationView()
|
|||||||
void
|
void
|
||||||
NotificationView::AttachedToWindow()
|
NotificationView::AttachedToWindow()
|
||||||
{
|
{
|
||||||
|
SetText();
|
||||||
|
|
||||||
BMessage msg(kRemoveView);
|
BMessage msg(kRemoveView);
|
||||||
msg.AddPointer("view", this);
|
msg.AddPointer("view", this);
|
||||||
|
|
||||||
@@ -431,9 +433,10 @@ NotificationView::GetSupportedSuites(BMessage* msg)
|
|||||||
void
|
void
|
||||||
NotificationView::SetText(float newMaxWidth)
|
NotificationView::SetText(float newMaxWidth)
|
||||||
{
|
{
|
||||||
if (newMaxWidth < 0) {
|
if (newMaxWidth < 0 && Parent())
|
||||||
newMaxWidth = 200;
|
newMaxWidth = Parent()->Bounds().IntegerWidth();
|
||||||
}
|
if (newMaxWidth <= 0)
|
||||||
|
newMaxWidth = kDefaultWidth;
|
||||||
|
|
||||||
// Delete old lines
|
// Delete old lines
|
||||||
LineInfoList::iterator lIt;
|
LineInfoList::iterator lIt;
|
||||||
|
|||||||
Reference in New Issue
Block a user