Files
haiku-beta6/src/apps/stylededit/ColorMenuItem.cpp
T

34 lines
584 B
C++
Raw Normal View History

/*
* 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>
2012-07-25 19:16:11 +02:00
ColorMenuItem::ColorMenuItem(const char *label, rgb_color color,
BMessage *message)
: BMenuItem(label, message, 0, 0),
fItemColor(color)
{
}
void
ColorMenuItem::DrawContent()
{
2012-07-25 19:16:11 +02:00
BMenu* menu = Menu();
if (menu) {
rgb_color menuColor = menu->HighColor();
menu->SetHighColor(fItemColor);
BMenuItem::DrawContent();
menu->SetHighColor(menuColor);
}
}