Ticket #1089: patch_decorator

File patch_decorator, 2.6 KB (added by stpere, 16 years ago)
Line 
1Index: src/servers/app/DefaultDecorator.cpp
2===================================================================
3--- src/servers/app/DefaultDecorator.cpp (révision 30273)
4+++ src/servers/app/DefaultDecorator.cpp (copie de travail)
5@@ -5,6 +5,7 @@
6 * Authors:
7 * DarkWyrm <bpmagic@columbus.rr.com>
8 * Stephan Aßmus <superstippi@gmx.de>
9+ * Philippe Saint-Pierre, stpere@gmail.com
10 */
11
12 /*! Default and fallback decorator for the app_server - the yellow tabs */
13@@ -80,10 +81,10 @@
14 fNonFocusFrameColors[1] = (rgb_color){ 216, 216, 216, 255 };
15 fNonFocusFrameColors[1] = fNonFocusFrameColors[0];
16
17- fFocusTabColor = UIColor(B_WINDOW_TAB_COLOR);
18- fFocusTextColor = UIColor(B_WINDOW_TEXT_COLOR);
19- fNonFocusTabColor = UIColor(B_WINDOW_INACTIVE_TAB_COLOR);
20- fNonFocusTextColor = UIColor(B_WINDOW_INACTIVE_TEXT_COLOR);
21+ fFocusTabColor = settings.UIColor(B_WINDOW_TAB_COLOR);
22+ fFocusTextColor = settings.UIColor(B_WINDOW_TEXT_COLOR);
23+ fNonFocusTabColor = settings.UIColor(B_WINDOW_INACTIVE_TAB_COLOR);
24+ fNonFocusTextColor = settings.UIColor(B_WINDOW_INACTIVE_TEXT_COLOR);
25
26 fCloseBitmaps[0] = fCloseBitmaps[1] = fCloseBitmaps[2] = fCloseBitmaps[3]
27 = fZoomBitmaps[0] = fZoomBitmaps[1] = fZoomBitmaps[2] = fZoomBitmaps[3]
28@@ -1269,6 +1270,8 @@
29 bool focus;
30 int32 width;
31 int32 height;
32+ rgb_color focusColor;
33+ rgb_color nonFocusColor;
34 UtilityBitmap* bitmap;
35 decorator_bitmap* next;
36 };
37@@ -1282,7 +1285,9 @@
38 while (current) {
39 if (current->item == item && current->down == down
40 && current->focus == focus && current->width == width
41- && current->height == height) {
42+ && current->height == height
43+ && current->focusColor == object->fFocusTabColor
44+ && current->nonFocusColor == object->fNonFocusTabColor) {
45 return current->bitmap;
46 }
47
48@@ -1317,15 +1322,15 @@
49 BRect zoomRect(rect);
50 zoomRect.left += inset;
51 zoomRect.top += inset;
52- object->_DrawBlendedRect(sBitmapDrawingEngine, zoomRect, down,
53- focus);
54+ object->_DrawBlendedRect(sBitmapDrawingEngine, zoomRect,
55+ down, focus);
56
57 inset = floorf(width / 2.1);
58 zoomRect = rect;
59 zoomRect.right -= inset;
60 zoomRect.bottom -= inset;
61- object->_DrawBlendedRect(sBitmapDrawingEngine, zoomRect, down,
62- focus);
63+ object->_DrawBlendedRect(sBitmapDrawingEngine, zoomRect,
64+ down, focus);
65 break;
66 }
67 }
68@@ -1348,6 +1353,8 @@
69 entry->width = width;
70 entry->height = height;
71 entry->bitmap = bitmap;
72+ entry->focusColor = object->fFocusTabColor;
73+ entry->nonFocusColor = object->fNonFocusTabColor;
74 entry->next = sBitmapList;
75 sBitmapList = entry;
76 return bitmap;