On Mon, 14 Nov 2011 09:50:03 +1300, <jscipione@xxxxxxxxx> wrote:
Commit: 30d17caa9d4370c1425b7ad42c1a1cd771e89b13 URL: http://cgit.haiku-os.org/haiku/commit/?id=30d17ca Author: John Scipione <jscipione@xxxxxxxxx> Date: Fri Oct 28 08:14:28 2011 UTC Added support for colored window tabs in the default decorator. ............................................................................ headers/os/interface/InterfaceDefs.h | 5 ++- headers/private/app/ServerReadOnlyMemory.h | 8 ++-- src/bin/WindowShade.cpp | 2 + src/kits/interface/InterfaceDefs.cpp | 2 + src/preferences/appearance/ColorSet.cpp | 6 ++- src/servers/app/WorkspacesView.cpp | 4 +-src/servers/app/decorator/DefaultDecorator.cpp | 55 ++++++++++----------src/servers/app/decorator/DefaultDecorator.h | 10 +++- 8 files changed, 54 insertions(+), 38 deletions(-)diff --git a/headers/os/interface/InterfaceDefs.h b/headers/os/interface/InterfaceDefs.hindex 40f2d89..0f85a48 100644 --- a/headers/os/interface/InterfaceDefs.h +++ b/headers/os/interface/InterfaceDefs.h @@ -322,7 +322,10 @@ enum color_which { B_WINDOW_TAB_COLOR = 3, B_WINDOW_TEXT_COLOR = 22, B_WINDOW_INACTIVE_TAB_COLOR = 23, - B_WINDOW_INACTIVE_TEXT_COLOR = 24 + B_WINDOW_INACTIVE_TEXT_COLOR = 24, + + B_WINDOW_BORDER_COLOR = 25, + B_WINDOW_INACTIVE_BORDER_COLOR = 26 };
from the comment in InterfaceDefs.h you added them to the deprecated section, is that correct? or is it just B_DESKTOP_COLOR?
http://cgit.haiku-os.org/haiku/tree/headers/os/interface/InterfaceDefs.h
............................................................................ headers/private/app/ServerReadOnlyMemory.h | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)diff --git a/headers/private/app/ServerReadOnlyMemory.h b/headers/private/app/ServerReadOnlyMemory.hindex 477ee4c..6ceadfd 100644 --- a/headers/private/app/ServerReadOnlyMemory.h +++ b/headers/private/app/ServerReadOnlyMemory.h @@ -40,8 +40,10 @@ index_to_color_which(int32 index) if (index >= 0 && index < kNumColors) { if ((color_which)index < B_WINDOW_INACTIVE_BORDER_COLOR) return (color_which)(index + 1); - else- return (color_which)(index + B_SUCCESS_COLOR - B_WINDOW_INACTIVE_BORDER_COLOR);+ else { + return (color_which)(index + B_SUCCESS_COLOR + - B_WINDOW_INACTIVE_BORDER_COLOR); + } } return (color_which)-1;
wouldn't it be better to add a B_LAST_COLOR entry which points to B_WINDOW_INACTIVE_BORDER_COLOR?
Regards, Clemens