- (Hopefully) improved readability of colored entities inside the schedulables tree and resource list

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1091 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
elvez 2006-09-11 00:40:34 +00:00
parent 753f5db241
commit afd292142e
4 changed files with 15 additions and 15 deletions

View File

@ -774,9 +774,9 @@ a request has no additional information other than its state, it makes sense to
its associated subrequests on a single line. @*
So the color of the @strong{at <n>:} represents the state of the
request, the <n> being the instant at which the request is raised.@*
Then there are a series of subrequests, which are displayed as colored @strong{->} (arrows), followed by a
resource name and two numbers separated by a slash. The color of the arrow represents the state of the subrequest,
and the numbers between parenthesis are its "elapsed time"/"required time".
Then there are a series of subrequests, which are displayed as @strong{->} (arrows), followed by a
colored resource name and two numbers separated by a slash. The color of the resource represents
the state of the subrequest, and the numbers between parenthesis are its "elapsed time"/"required time".
@c % -------------------------------------------------
@node The Resources list, The Simulation widget, The Schedulables/Requests tree, From the GUI

View File

@ -119,15 +119,15 @@ GlobalPreferences::get_schedulable_color(Schedulable::state st) const
switch(st)
{
case Schedulable::state_running:
return "green";
return "ForestGreen";
case Schedulable::state_ready:
return "yellow";
return "GoldenRod";
case Schedulable::state_blocked:
return "red";
case Schedulable::state_terminated:
return "DimGray";
return "DarkSlateGray";
case Schedulable::state_future:
return "LightGrey";
return "Gray";
default:
return "black";
}
@ -139,15 +139,15 @@ GlobalPreferences::get_request_color(Request::state st) const
switch(st)
{
case Request::state_allocated:
return "green";
return "ForestGreen";
case Request::state_allocable:
return "yellow";
return "GoldenRod";
case Request::state_unallocable:
return "red";
case Request::state_exhausted:
return "DimGray";
return "DarkSlateGray";
case Request::state_future:
return "LightGrey";
return "Gray";
default:
return "black";
}

View File

@ -295,10 +295,10 @@ ResourcesWidget::_on_cell_name_data(Gtk::CellRenderer* cr,
{
SubRequest& sr = *(*it);
oss << "<span foreground=\""
oss << "<b><span foreground=\""
<< GlobalPreferences::get_instance().get_request_color(sr.get_state())
<< "\"> " << sr.get_request().get_thread().get_name()
<< "</span>" << " ("
<< "</span></b>" << " ("
<< (sr.get_length() - sr.get_remaining_time())
<< "/" << sr.get_length() << ")";
}

View File

@ -667,9 +667,9 @@ SchedulablesTreeWidget::markup_request(Request& r)
SubRequest& sr = *(*it);
Resource& res = *(resources.find(sr.get_resource_key())->second);
oss << "<span foreground=\""
oss << " -&gt; <span foreground=\""
<< GlobalPreferences::get_instance().get_request_color(sr.get_state())
<< "\"> -&gt; </span>" << res.get_name() << " ("
<< "\"><b>" << res.get_name() << "</b></span> ("
<< (sr.get_length() - sr.get_remaining_time())
<< "/" << sr.get_length() << ")";
}