From 568b1f0bafd46becdc128c243bc0c4dce4f55990 Mon Sep 17 00:00:00 2001 From: Ryan Leavengood Date: Wed, 29 Jul 2009 06:52:00 +0000 Subject: [PATCH] Small workspaces view tweaks: draw only the currently focused window yellow, and use the navigation color for the selected window (when dragging in the workspaces view.) I hope window->IsFocus() is enough, the DefaultDecorator seems to have more complex logic. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31895 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/WorkspacesView.cpp | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/servers/app/WorkspacesView.cpp b/src/servers/app/WorkspacesView.cpp index 83c7ff77d4..fb975c2087 100644 --- a/src/servers/app/WorkspacesView.cpp +++ b/src/servers/app/WorkspacesView.cpp @@ -193,21 +193,29 @@ WorkspacesView::_DrawWindow(DrawingEngine* drawingEngine, && !workspaceFrame.Intersects(tabFrame)) return; - rgb_color yellow = (rgb_color){ 255, 203, 0, 255 }; - if (decorator != NULL) - yellow = decorator->UIColor(B_WINDOW_TAB_COLOR); + rgb_color activeTabColor = (rgb_color){ 255, 203, 0, 255 }; + rgb_color inactiveTabColor = (rgb_color){ 232, 232, 232, 255 }; + rgb_color navColor = (rgb_color){ 0, 0, 229, 255 }; + if (decorator != NULL) { + activeTabColor = decorator->UIColor(B_WINDOW_TAB_COLOR); + inactiveTabColor = decorator->UIColor(B_WINDOW_INACTIVE_TAB_COLOR); + navColor = decorator->UIColor(B_NAVIGATION_BASE_COLOR); + } // TODO: let decorator do this! rgb_color frameColor = (rgb_color){ 180, 180, 180, 255 }; rgb_color white = (rgb_color){ 255, 255, 255, 255 }; + rgb_color tabColor = inactiveTabColor; + if (window->IsFocus()) + tabColor = activeTabColor; + if (!active) { - _DarkenColor(yellow); + _DarkenColor(tabColor); _DarkenColor(frameColor); _DarkenColor(white); } if (window == fSelectedWindow) { - // TODO: what about standard navigation color here? - frameColor = (rgb_color){ 80, 80, 80, 255 }; + frameColor = navColor; } if (tabFrame.left < frame.left) @@ -220,7 +228,7 @@ WorkspacesView::_DrawWindow(DrawingEngine* drawingEngine, tabFrame = tabFrame & workspaceFrame; if (decorator != NULL && tabFrame.IsValid()) { - drawingEngine->FillRect(tabFrame, yellow); + drawingEngine->FillRect(tabFrame, tabColor); backgroundRegion.Exclude(tabFrame); }