* 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:
@@ -536,9 +536,13 @@ public:
|
|||||||
if (thread == NULL)
|
if (thread == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// compose name string
|
||||||
|
BString name = thread->Name();
|
||||||
|
name << " (" << thread->ID() << ")";
|
||||||
|
|
||||||
// draw the string
|
// draw the string
|
||||||
float y = lineRect.bottom - fFontInfo.fontHeight.descent + 1;
|
float y = lineRect.bottom - fFontInfo.fontHeight.descent + 1;
|
||||||
DrawString(thread->Name(), BPoint(kThreadNameMargin, y));
|
DrawString(name, BPoint(kThreadNameMargin, y));
|
||||||
}
|
}
|
||||||
|
|
||||||
BRect bounds(Bounds());
|
BRect bounds(Bounds());
|
||||||
@@ -555,9 +559,14 @@ public:
|
|||||||
return BSize(100, TotalHeight());
|
return BSize(100, TotalHeight());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual BSize PreferredSize()
|
||||||
|
{
|
||||||
|
return BSize(250, TotalHeight());
|
||||||
|
}
|
||||||
|
|
||||||
virtual BSize MaxSize()
|
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
|
// create the tool tip
|
||||||
BString text;
|
BString text;
|
||||||
text << "Time: " << format_nanotime(time) << "\n";
|
text << "Time: " << format_nanotime(time) << "\n";
|
||||||
text << "Thread: " << thread->Name() << "\n";
|
text << "Thread: " << thread->Name() << " (" << thread->ID() << ")\n";
|
||||||
text << "State: " << thread_state_name(threadState);
|
text << "State: " << thread_state_name(threadState);
|
||||||
if (threadWaitObject != NULL) {
|
if (threadWaitObject != NULL) {
|
||||||
char objectName[32];
|
char objectName[32];
|
||||||
@@ -1303,7 +1312,10 @@ public:
|
|||||||
|
|
||||||
HeaderModel* headerModel = fHeaderView->Model();
|
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");
|
header->SetValue("Thread");
|
||||||
headerModel->AddHeader(header);
|
headerModel->AddHeader(header);
|
||||||
header->AddListener(this);
|
header->AddListener(this);
|
||||||
|
|||||||
Reference in New Issue
Block a user