From 46f29e60b49f1149d45e3fe183a36f730051cf19 Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Thu, 6 Dec 2007 21:09:35 +0000 Subject: [PATCH] Also update the ui_color for menu backgrounds, when using set_menu_info. Update the menu_info neverthless, when setting the ui_color for menu backgrounds. Fixes bug #550. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23070 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/DesktopSettings.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/servers/app/DesktopSettings.cpp b/src/servers/app/DesktopSettings.cpp index 79ff437fe5..5657d6a9e3 100644 --- a/src/servers/app/DesktopSettings.cpp +++ b/src/servers/app/DesktopSettings.cpp @@ -391,7 +391,9 @@ void DesktopSettingsPrivate::SetMenuInfo(const menu_info& info) { fMenuInfo = info; - Save(kAppearanceSettings); + // Also update the ui_color + SetUIColor(B_MENU_BACKGROUND_COLOR, info.background_color); + // SetUIColor already saves the settings } @@ -486,6 +488,10 @@ DesktopSettingsPrivate::SetUIColor(color_which which, const rgb_color color) if (index < 0 || index >= kNumColors) return; fShared.colors[index] = color; + // TODO: deprecate the background_color member of the menu_info struct, + // otherwise we have to keep this duplication... + if (which == B_MENU_BACKGROUND_COLOR) + fMenuInfo.background_color = color; Save(kAppearanceSettings); }