Never use the current menu UI color, but always the view color of any given
menu. Fixes #974. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28030 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ecb3d008d6
commit
eaa9af9937
@ -86,7 +86,7 @@ TBarMenuTitle::DrawContent()
|
||||
{
|
||||
BMenu *menu = Menu();
|
||||
BRect frame(Frame());
|
||||
rgb_color menuColor = ui_color(B_MENU_BACKGROUND_COLOR);
|
||||
rgb_color menuColor = menu->ViewColor();
|
||||
rgb_color dark = tint_color(menuColor, B_DARKEN_1_TINT);
|
||||
rgb_color light = tint_color(menuColor, B_LIGHTEN_2_TINT);
|
||||
rgb_color black = {0, 0, 0, 255};
|
||||
|
@ -131,8 +131,8 @@ TBarView::Draw(BRect)
|
||||
{
|
||||
BRect bounds(Bounds());
|
||||
|
||||
rgb_color hilite = tint_color(ui_color(B_MENU_BACKGROUND_COLOR), B_DARKEN_1_TINT);
|
||||
rgb_color light = tint_color(ui_color(B_MENU_BACKGROUND_COLOR), B_LIGHTEN_2_TINT);
|
||||
rgb_color hilite = tint_color(ViewColor(), B_DARKEN_1_TINT);
|
||||
rgb_color light = tint_color(ViewColor(), B_LIGHTEN_2_TINT);
|
||||
|
||||
SetHighColor(hilite);
|
||||
if (AcrossTop())
|
||||
|
@ -132,7 +132,7 @@ CalendarMenuItem::DrawContent()
|
||||
Menu()->DrawString(text, point);
|
||||
|
||||
if (today) {
|
||||
Menu()->SetLowColor(ui_color(B_MENU_BACKGROUND_COLOR));
|
||||
Menu()->SetLowColor(Menu()->ViewColor());
|
||||
Menu()->SetFont(be_plain_font);
|
||||
}
|
||||
|
||||
|
@ -659,7 +659,7 @@ void
|
||||
TExpandoMenuBar::DrawBackground(BRect)
|
||||
{
|
||||
BRect bounds(Bounds());
|
||||
rgb_color menuColor = ui_color(B_MENU_BACKGROUND_COLOR);
|
||||
rgb_color menuColor = ViewColor();
|
||||
rgb_color hilite = tint_color(menuColor, B_DARKEN_1_TINT);
|
||||
rgb_color dark = tint_color(menuColor, B_DARKEN_2_TINT);
|
||||
rgb_color vlight = tint_color(menuColor, B_LIGHTEN_2_TINT);
|
||||
|
@ -325,7 +325,7 @@ TReplicantTray::AdjustPlacement()
|
||||
void
|
||||
TReplicantTray::Draw(BRect)
|
||||
{
|
||||
rgb_color menuColor = ui_color(B_MENU_BACKGROUND_COLOR);
|
||||
rgb_color menuColor = ViewColor();
|
||||
rgb_color vdark = tint_color(menuColor, B_DARKEN_3_TINT);
|
||||
rgb_color light = tint_color(menuColor, B_LIGHTEN_2_TINT);
|
||||
|
||||
@ -1441,7 +1441,7 @@ TDragRegion::FrameMoved(BPoint)
|
||||
void
|
||||
TDragRegion::Draw(BRect)
|
||||
{
|
||||
rgb_color menuColor = ui_color(B_MENU_BACKGROUND_COLOR);
|
||||
rgb_color menuColor = ViewColor();
|
||||
rgb_color hilite = tint_color(menuColor, B_DARKEN_1_TINT);
|
||||
rgb_color vdark = tint_color(menuColor, B_DARKEN_3_TINT);
|
||||
rgb_color vvdark = tint_color(menuColor, B_DARKEN_4_TINT);
|
||||
@ -1479,7 +1479,7 @@ TDragRegion::Draw(BRect)
|
||||
void
|
||||
TDragRegion::DrawDragRegion()
|
||||
{
|
||||
rgb_color menuColor = ui_color(B_MENU_BACKGROUND_COLOR);
|
||||
rgb_color menuColor = ViewColor();
|
||||
rgb_color menuHilite = tint_color(menuColor, B_HIGHLIGHT_BACKGROUND_TINT);
|
||||
rgb_color vdark = tint_color(menuColor, B_DARKEN_3_TINT);
|
||||
rgb_color light = tint_color(menuColor, B_LIGHTEN_2_TINT);
|
||||
|
@ -220,7 +220,7 @@ TTeamMenuItem::Draw()
|
||||
BRect frame(Frame());
|
||||
BMenu *menu = Menu();
|
||||
menu->PushState();
|
||||
rgb_color menuColor = ui_color(B_MENU_BACKGROUND_COLOR);
|
||||
rgb_color menuColor = menu->ViewColor();
|
||||
|
||||
// if not selected or being tracked on, fill with gray
|
||||
TBarView *barview = (static_cast<TBarApp *>(be_app))->BarView();
|
||||
@ -413,9 +413,10 @@ TTeamMenuItem::DrawContentLabel()
|
||||
label = Label();
|
||||
|
||||
TBarView *barview = (static_cast<TBarApp *>(be_app))->BarView();
|
||||
bool canHandle = !barview->Dragging() || barview->AppCanHandleTypes(Signature());
|
||||
bool canHandle = !barview->Dragging()
|
||||
|| barview->AppCanHandleTypes(Signature());
|
||||
if (IsSelected() && IsEnabled() && canHandle)
|
||||
menu->SetLowColor(tint_color(ui_color(B_MENU_BACKGROUND_COLOR),
|
||||
menu->SetLowColor(tint_color(menu->ViewColor(),
|
||||
B_HIGHLIGHT_BACKGROUND_TINT));
|
||||
else
|
||||
menu->SetLowColor(menu->ViewColor());
|
||||
|
@ -171,7 +171,7 @@ void
|
||||
TWindowMenuItem::Draw()
|
||||
{
|
||||
if (fExpanded) {
|
||||
rgb_color menuColor = ui_color(B_MENU_BACKGROUND_COLOR);
|
||||
rgb_color menuColor = Menu()->ViewColor();
|
||||
BRect frame(Frame());
|
||||
BMenu *menu = Menu();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user