Index: src/tests/servers/app/playground/ObjectWindow.cpp
===================================================================
--- src/tests/servers/app/playground/ObjectWindow.cpp	(révision 29844)
+++ src/tests/servers/app/playground/ObjectWindow.cpp	(copie de travail)
@@ -9,6 +9,7 @@
 #include <Box.h>
 #include <Button.h>
 #include <CheckBox.h>
+#include <ColorControl.h>
 #include <ListItem.h>
 #include <ListView.h>
 #include <Menu.h>
@@ -285,50 +286,32 @@
 	item->SetMarked(true);
 	popupMenu->AddItem(item);
 
-	b.OffsetBy(0, radioButton->Bounds().Height() + 5.0);
+	b.OffsetBy(0, radioButton->Bounds().Height() + 10.0);
 	fDrawingModeMF = new BMenuField(b, "drawing mode field", "Mode",
 									popupMenu);
 
 	controlGroup->AddChild(fDrawingModeMF);
 
 	fDrawingModeMF->SetDivider(fDrawingModeMF->StringWidth(fDrawingModeMF->Label()) + 10.0);
-
-	// red text control
-	b.OffsetBy(0, fDrawingModeMF->Bounds().Height() + 5.0);
-	fRedTC = new BTextControl(b, "red text control", "Red", "",
-							  new BMessage(MSG_SET_COLOR));
-	controlGroup->AddChild(fRedTC);
-
-	// green text control
-	b.OffsetBy(0, fRedTC->Bounds().Height() + 5.0);
-	fGreenTC = new BTextControl(b, "green text control", "Green", "",
-								new BMessage(MSG_SET_COLOR));
-	controlGroup->AddChild(fGreenTC);
-
-	// blue text control
-	b.OffsetBy(0, fGreenTC->Bounds().Height() + 5.0);
-	fBlueTC = new BTextControl(b, "blue text control", "Blue", "",
-							   new BMessage(MSG_SET_COLOR));
-	controlGroup->AddChild(fBlueTC);
-
+	
+	// color control
+	b.OffsetBy(0, fDrawingModeMF->Bounds().Height() + 10.0);
+	fColorControl = new BColorControl(b.LeftTop(), B_CELLS_16x16, 8, "color control",
+										new BMessage(MSG_SET_COLOR));
+	controlGroup->AddChild(fColorControl);
+	
 	// alpha text control
-	b.OffsetBy(0, fBlueTC->Bounds().Height() + 5.0);
+	b.OffsetBy(0, fColorControl-> Bounds().Height() + 5.0);
 	fAlphaTC = new BTextControl(b, "alpha text control", "Alpha", "",
 								new BMessage(MSG_SET_COLOR));
 	controlGroup->AddChild(fAlphaTC);
 
 	// divide text controls the same
-	float mWidth = fDrawingModeMF->StringWidth(fDrawingModeMF->Label());
-	float rWidth = fRedTC->StringWidth(fRedTC->Label());
-	float gWidth = fGreenTC->StringWidth(fGreenTC->Label());
-	float bWidth = fBlueTC->StringWidth(fBlueTC->Label());
-	float aWidth = fAlphaTC->StringWidth(fAlphaTC->Label());
-
-	float width = max_c(mWidth, max_c(rWidth, max_c(gWidth, max_c(bWidth, aWidth)))) + 10.0;
+    float mWidth = fDrawingModeMF->StringWidth(fDrawingModeMF->Label());
+    float aWidth = fAlphaTC->StringWidth(fAlphaTC->Label());
+    
+    float width = max_c(mWidth, aWidth) + 20.0;
 	fDrawingModeMF->SetDivider(width);
-	fRedTC->SetDivider(width);
-	fGreenTC->SetDivider(width);
-	fBlueTC->SetDivider(width);
 	fAlphaTC->SetDivider(width);
 
 	// fill check box
@@ -355,7 +338,7 @@
 	b.InsetBy(9.0, 7.0);
 	b.left = b.left + b.Width() / 2.0 + 6.0;
 	b.right -= B_V_SCROLL_BAR_WIDTH;
-b.bottom = fDrawingModeMF->Frame().top - 5.0;
+    b.bottom = fDrawingModeMF->Frame().top - 10.0;
 
 	fObjectLV = new ObjectListView(b, "object list", B_SINGLE_SELECTION_LIST);
 	fObjectLV->SetSelectionMessage(new BMessage(MSG_OBJECT_SELECTED));
@@ -366,23 +349,6 @@
 								 B_FANCY_BORDER);
 	controlGroup->AddChild(scrollView);
 
-	// add a dummy tab view
-	b.top = b.bottom + 10.0;
-	b.right += B_V_SCROLL_BAR_WIDTH;
-	b.bottom = controlGroup->Bounds().bottom - 7.0;
-	BTabView* tabView = new BTabView(b, "tab view", B_WIDTH_FROM_WIDEST, 
-									 B_FOLLOW_ALL, B_FULL_UPDATE_ON_RESIZE |
-									 B_WILL_DRAW | B_NAVIGABLE_JUMP |
-									 B_FRAME_EVENTS | B_NAVIGABLE);
-	
-	BView* tabChild = new TestView(BRect(0, 0, 40, 40), "T", B_FOLLOW_ALL, 0);
-	tabView->AddTab(tabChild);
-	tabChild = new TestView(BRect(0, 0, 40, 40), "T", B_FOLLOW_ALL, 0);
-	tabView->AddTab(tabChild);
-	tabChild = new BTextControl(BRect(0, 0, 80, 40), "T", "Test", "Text", NULL);
-	tabView->AddTab(tabChild);
-	controlGroup->AddChild(tabView);
-
 	// enforce some size limits
 	float minWidth = controlGroup->Frame().Width() + 30.0;
 	float minHeight = fPenSizeS->Frame().bottom +
@@ -520,17 +486,10 @@
 	rgb_color c = fObjectView->StateColor();
 	char string[32];
 
-	sprintf(string, "%d", c.red);
-	fRedTC->SetText(string);
-
-	sprintf(string, "%d", c.green);
-	fGreenTC->SetText(string);
-
-	sprintf(string, "%d", c.blue);
-	fBlueTC->SetText(string);
-
 	sprintf(string, "%d", c.alpha);
 	fAlphaTC->SetText(string);
+
+	fColorControl->SetValue(c);
 }
 
 // _GetColor
@@ -538,11 +497,10 @@
 ObjectWindow::_GetColor() const
 {
 	rgb_color c;
-	c.red	= max_c(0, min_c(255, atoi(fRedTC->Text())));
-	c.green	= max_c(0, min_c(255, atoi(fGreenTC->Text())));
-	c.blue	= max_c(0, min_c(255, atoi(fBlueTC->Text())));
-	c.alpha	= max_c(0, min_c(255, atoi(fAlphaTC->Text())));
-
+	
+	c = fColorControl->ValueAsColor();
+	c.alpha = max_c(0, min_c(255, atoi(fAlphaTC->Text())));
+	
 	return c;
 }
 
Index: src/tests/servers/app/playground/ObjectWindow.h
===================================================================
--- src/tests/servers/app/playground/ObjectWindow.h	(révision 29844)
+++ src/tests/servers/app/playground/ObjectWindow.h	(copie de travail)
@@ -7,6 +7,7 @@
 
 class BButton;
 class BCheckBox;
+class BColorControl;
 class BListView;
 class BMenuField;
 class BTextControl;
@@ -37,9 +38,7 @@
 
 	BMenuField*			fDrawingModeMF;
 
-	BTextControl*		fRedTC;
-	BTextControl*		fGreenTC;
-	BTextControl*		fBlueTC;
+	BColorControl*		fColorControl;
 	BTextControl*		fAlphaTC;
 
 	BCheckBox*			fFillCB;
