App Server now saves/restores ui_color settings.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24225 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -20,6 +20,8 @@ struct server_read_only_memory {
|
||||
};
|
||||
|
||||
|
||||
// NOTE: these functions must be kept in sync with InterfaceDefs.h color_which!
|
||||
|
||||
static inline int32
|
||||
color_which_to_index(color_which which)
|
||||
{
|
||||
@@ -32,4 +34,17 @@ color_which_to_index(color_which which)
|
||||
return -1;
|
||||
}
|
||||
|
||||
static inline color_which
|
||||
index_to_color_which(int32 index)
|
||||
{
|
||||
if (index >= 0 && index < kNumColors) {
|
||||
if ((color_which)index < B_WINDOW_INACTIVE_TEXT_COLOR)
|
||||
return (color_which)(index + 1);
|
||||
else
|
||||
return (color_which)(index + B_SUCCESS_COLOR - B_WINDOW_INACTIVE_TEXT_COLOR);
|
||||
}
|
||||
|
||||
return (color_which)-1;
|
||||
}
|
||||
|
||||
#endif /* SERVER_READ_ONLY_MEMORY_H */
|
||||
|
||||
Reference in New Issue
Block a user