* Some beautification, mostly for when the replicant is embedded on the Desktop.

* Fall back to a shorter legend label when the room is too small (before
  truncating).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30001 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2009-04-07 16:09:00 +00:00
parent 1111232758
commit ed1b27536b
4 changed files with 138 additions and 22 deletions
+72
View File
@@ -150,6 +150,13 @@ DataSource::Name() const
}
const char*
DataSource::ShortLabel() const
{
return Label();
}
const char*
DataSource::Label() const
{
@@ -325,6 +332,13 @@ UsedMemoryDataSource::Label() const
}
const char*
UsedMemoryDataSource::ShortLabel() const
{
return "Memory";
}
bool
UsedMemoryDataSource::Primary() const
{
@@ -367,6 +381,13 @@ CachedMemoryDataSource::Label() const
}
const char*
CachedMemoryDataSource::ShortLabel() const
{
return "Cache";
}
bool
CachedMemoryDataSource::Primary() const
{
@@ -412,6 +433,13 @@ SwapSpaceDataSource::Label() const
}
const char*
SwapSpaceDataSource::ShortLabel() const
{
return "Swap";
}
bool
SwapSpaceDataSource::Primary() const
{
@@ -459,6 +487,13 @@ SemaphoresDataSource::Label() const
}
const char*
SemaphoresDataSource::ShortLabel() const
{
return "Sems";
}
bool
SemaphoresDataSource::AdaptiveScale() const
{
@@ -647,6 +682,13 @@ RunningAppsDataSource::Label() const
}
const char*
RunningAppsDataSource::ShortLabel() const
{
return "Apps";
}
bool
RunningAppsDataSource::AdaptiveScale() const
{
@@ -676,6 +718,7 @@ CPUUsageDataSource::CPUUsageDataSource(const CPUUsageDataSource& other)
fPreviousTime = other.fPreviousTime;
fCPU = other.fCPU;
fLabel = other.fLabel;
fShortLabel = other.fShortLabel;
}
@@ -737,6 +780,13 @@ CPUUsageDataSource::Label() const
}
const char*
CPUUsageDataSource::ShortLabel() const
{
return fShortLabel.String();
}
const char*
CPUUsageDataSource::Name() const
{
@@ -773,6 +823,7 @@ CPUUsageDataSource::_SetCPU(int32 cpu)
if (SystemInfo().CPUCount() > 1)
fLabel << " " << cpu;
fShortLabel = fLabel;
fLabel << " Usage";
const rgb_color kColors[] = {
@@ -867,6 +918,13 @@ CPUCombinedUsageDataSource::Label() const
}
const char*
CPUCombinedUsageDataSource::ShortLabel() const
{
return "CPU";
}
const char*
CPUCombinedUsageDataSource::Name() const
{
@@ -958,6 +1016,13 @@ PageFaultsDataSource::Label() const
}
const char*
PageFaultsDataSource::ShortLabel() const
{
return "P-Faults";
}
const char*
PageFaultsDataSource::Name() const
{
@@ -1052,6 +1117,13 @@ NetworkUsageDataSource::Label() const
}
const char*
NetworkUsageDataSource::ShortLabel() const
{
return fIn ? "RX" : "TX";
}
const char*
NetworkUsageDataSource::Name() const
{