* Added the thread's ID to its name in the first column and in the tool tip.

* Made the thread name column wider by default.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34632 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2009-12-11 15:38:13 +00:00
parent 9a76765acb
commit ed4f4fcf8b
1 changed files with 16 additions and 4 deletions

View File

@ -536,9 +536,13 @@ public:
if (thread == NULL)
continue;
// compose name string
BString name = thread->Name();
name << " (" << thread->ID() << ")";
// draw the string
float y = lineRect.bottom - fFontInfo.fontHeight.descent + 1;
DrawString(thread->Name(), BPoint(kThreadNameMargin, y));
DrawString(name, BPoint(kThreadNameMargin, y));
}
BRect bounds(Bounds());
@ -555,9 +559,14 @@ public:
return BSize(100, TotalHeight());
}
virtual BSize PreferredSize()
{
return BSize(250, TotalHeight());
}
virtual BSize MaxSize()
{
return BSize(1000, B_SIZE_UNLIMITED);
return BSize(B_SIZE_UNLIMITED, B_SIZE_UNLIMITED);
}
};
@ -777,7 +786,7 @@ public:
// create the tool tip
BString text;
text << "Time: " << format_nanotime(time) << "\n";
text << "Thread: " << thread->Name() << "\n";
text << "Thread: " << thread->Name() << " (" << thread->ID() << ")\n";
text << "State: " << thread_state_name(threadState);
if (threadWaitObject != NULL) {
char objectName[32];
@ -1303,7 +1312,10 @@ public:
HeaderModel* headerModel = fHeaderView->Model();
Header* header = new Header(100, 100, 10000, 200, 0);
Header* header = new Header((int32)fThreadsView->PreferredSize().width,
(int32)fThreadsView->MinSize().width,
(int32)fThreadsView->MaxSize().width,
(int32)fThreadsView->PreferredSize().width, 0);
header->SetValue("Thread");
headerModel->AddHeader(header);
header->AddListener(this);