haiku/src/apps/stylededit/ColorMenuItem.cpp
Ryan Leavengood b40c990627 Additional style fixes from Julun: adding back the virtual keyword, moving the
commas on class member initializers, fixing a typo. Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22174 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-05 02:47:33 +00:00

33 lines
583 B
C++

/*
* Copyright 2002-2006, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Mattias Sundblad
* Andrew Bachmann
*/
#include "ColorMenuItem.h"
#include <Message.h>
ColorMenuItem::ColorMenuItem(const char *label, rgb_color color, BMessage *message)
: BMenuItem(label, message, 0, 0),
fItemColor(color)
{
}
void
ColorMenuItem::DrawContent()
{
BMenu *menu = Menu();
if (menu) {
rgb_color menuColor = menu->HighColor();
menu->SetHighColor(fItemColor);
BMenuItem::DrawContent();
menu->SetHighColor(menuColor);
}
}