Colors should be archived correctly now, at least for replicants.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25029 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
c28f8ea349
commit
79cbd22649
@ -334,6 +334,7 @@ ActivityView::ActivityView(const char* name, const BMessage* settings)
|
||||
: BView(BRect(0,0,300,200), name, B_FOLLOW_NONE, B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE | B_FRAME_EVENTS)
|
||||
#endif
|
||||
{
|
||||
SetLowColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||
_Init(settings);
|
||||
|
||||
BRect rect(Bounds());
|
||||
@ -369,7 +370,6 @@ ActivityView::_Init(const BMessage* settings)
|
||||
fLegendLayoutItem = NULL;
|
||||
#endif
|
||||
SetViewColor(B_TRANSPARENT_COLOR);
|
||||
SetLowColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||
|
||||
fRefreshInterval = kInitialRefreshInterval;
|
||||
fDrawInterval = kInitialRefreshInterval * 2;
|
||||
@ -388,6 +388,14 @@ ActivityView::_Init(const BMessage* settings)
|
||||
return;
|
||||
}
|
||||
|
||||
rgb_color *color;
|
||||
ssize_t colorLen;
|
||||
if (settings->FindData("background color", B_RGB_COLOR_TYPE,
|
||||
(const void **)&color, &colorLen) == B_OK &&
|
||||
colorLen == sizeof(rgb_color))
|
||||
fBackgroundColor = *color;
|
||||
|
||||
|
||||
const char* name;
|
||||
for (int32 i = 0; settings->FindString("source", i, &name) == B_OK; i++) {
|
||||
AddDataSource(DataSource::FindSource(name));
|
||||
@ -433,6 +441,10 @@ ActivityView::SaveState(BMessage& state) const
|
||||
if (status != B_OK)
|
||||
return status;
|
||||
|
||||
status = state.AddData("background color", B_RGB_COLOR_TYPE, &fBackgroundColor, sizeof(rgb_color));
|
||||
if (status != B_OK)
|
||||
return status;
|
||||
|
||||
for (int32 i = 0; i < fSources.CountItems(); i++) {
|
||||
DataSource* source = fSources.ItemAt(i);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user