Propagate set_ui_color() up to the DesktopSettingsPrivate class.
Still needs code to save the values. Also needs a way to access them from Decorator::UIColor(), but the DesktopSettings passed to the ctor can't be cached. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23024 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -478,6 +478,29 @@ DesktopSettingsPrivate::WorkspacesMessage(int32 index) const
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DesktopSettingsPrivate::SetUIColor(color_which which, const rgb_color color)
|
||||
{
|
||||
//
|
||||
int32 index = color_which_to_index(which);
|
||||
if (index < 0 || index >= kNumColors)
|
||||
return;
|
||||
fShared.colors[index] = color;
|
||||
Save(kAppearanceSettings);
|
||||
}
|
||||
|
||||
|
||||
rgb_color
|
||||
DesktopSettingsPrivate::UIColor(color_which which) const
|
||||
{
|
||||
static const rgb_color invalidColor = {0, 0, 0, 0};
|
||||
int32 index = color_which_to_index(which);
|
||||
if (index < 0 || index >= kNumColors)
|
||||
return invalidColor;
|
||||
return fShared.colors[index];
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark - read access
|
||||
|
||||
|
||||
@@ -563,6 +586,13 @@ DesktopSettings::WorkspacesMessage(int32 index) const
|
||||
}
|
||||
|
||||
|
||||
rgb_color
|
||||
DesktopSettings::UIColor(color_which which) const
|
||||
{
|
||||
return fSettings->UIColor(which);
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark - write access
|
||||
|
||||
|
||||
@@ -633,3 +663,11 @@ LockedDesktopSettings::SetShowAllDraggers(bool show)
|
||||
fSettings->SetShowAllDraggers(show);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
LockedDesktopSettings::SetUIColor(color_which which, const rgb_color color)
|
||||
{
|
||||
fSettings->SetUIColor(which, color);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user