1 /* 2 * Copyright 2002-2006, Haiku, Inc. All Rights Reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Mattias Sundblad 7 * Andrew Bachmann 8 */ 9 10 #include "ColorMenuItem.h" 11 12 #include <Message.h> 13 14 ColorMenuItem::ColorMenuItem(const char *label, rgb_color color, BMessage *message) 15 : BMenuItem(label, message, 0, 0), 16 fItemColor(color) 17 { 18 } 19 20 21 void 22 ColorMenuItem::DrawContent() 23 { 24 BMenu *menu = Menu(); 25 if (menu) { 26 rgb_color menuColor = menu->HighColor(); 27 28 menu->SetHighColor(fItemColor); 29 BMenuItem::DrawContent(); 30 menu->SetHighColor(menuColor); 31 } 32 } 33