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:
@@ -86,7 +86,7 @@ TBarMenuTitle::DrawContent()
|
|||||||
{
|
{
|
||||||
BMenu *menu = Menu();
|
BMenu *menu = Menu();
|
||||||
BRect frame(Frame());
|
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 dark = tint_color(menuColor, B_DARKEN_1_TINT);
|
||||||
rgb_color light = tint_color(menuColor, B_LIGHTEN_2_TINT);
|
rgb_color light = tint_color(menuColor, B_LIGHTEN_2_TINT);
|
||||||
rgb_color black = {0, 0, 0, 255};
|
rgb_color black = {0, 0, 0, 255};
|
||||||
|
|||||||
@@ -131,8 +131,8 @@ TBarView::Draw(BRect)
|
|||||||
{
|
{
|
||||||
BRect bounds(Bounds());
|
BRect bounds(Bounds());
|
||||||
|
|
||||||
rgb_color hilite = tint_color(ui_color(B_MENU_BACKGROUND_COLOR), B_DARKEN_1_TINT);
|
rgb_color hilite = tint_color(ViewColor(), B_DARKEN_1_TINT);
|
||||||
rgb_color light = tint_color(ui_color(B_MENU_BACKGROUND_COLOR), B_LIGHTEN_2_TINT);
|
rgb_color light = tint_color(ViewColor(), B_LIGHTEN_2_TINT);
|
||||||
|
|
||||||
SetHighColor(hilite);
|
SetHighColor(hilite);
|
||||||
if (AcrossTop())
|
if (AcrossTop())
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ CalendarMenuItem::DrawContent()
|
|||||||
Menu()->DrawString(text, point);
|
Menu()->DrawString(text, point);
|
||||||
|
|
||||||
if (today) {
|
if (today) {
|
||||||
Menu()->SetLowColor(ui_color(B_MENU_BACKGROUND_COLOR));
|
Menu()->SetLowColor(Menu()->ViewColor());
|
||||||
Menu()->SetFont(be_plain_font);
|
Menu()->SetFont(be_plain_font);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -659,7 +659,7 @@ void
|
|||||||
TExpandoMenuBar::DrawBackground(BRect)
|
TExpandoMenuBar::DrawBackground(BRect)
|
||||||
{
|
{
|
||||||
BRect bounds(Bounds());
|
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 hilite = tint_color(menuColor, B_DARKEN_1_TINT);
|
||||||
rgb_color dark = tint_color(menuColor, B_DARKEN_2_TINT);
|
rgb_color dark = tint_color(menuColor, B_DARKEN_2_TINT);
|
||||||
rgb_color vlight = tint_color(menuColor, B_LIGHTEN_2_TINT);
|
rgb_color vlight = tint_color(menuColor, B_LIGHTEN_2_TINT);
|
||||||
|
|||||||
@@ -325,7 +325,7 @@ TReplicantTray::AdjustPlacement()
|
|||||||
void
|
void
|
||||||
TReplicantTray::Draw(BRect)
|
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 vdark = tint_color(menuColor, B_DARKEN_3_TINT);
|
||||||
rgb_color light = tint_color(menuColor, B_LIGHTEN_2_TINT);
|
rgb_color light = tint_color(menuColor, B_LIGHTEN_2_TINT);
|
||||||
|
|
||||||
@@ -1441,7 +1441,7 @@ TDragRegion::FrameMoved(BPoint)
|
|||||||
void
|
void
|
||||||
TDragRegion::Draw(BRect)
|
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 hilite = tint_color(menuColor, B_DARKEN_1_TINT);
|
||||||
rgb_color vdark = tint_color(menuColor, B_DARKEN_3_TINT);
|
rgb_color vdark = tint_color(menuColor, B_DARKEN_3_TINT);
|
||||||
rgb_color vvdark = tint_color(menuColor, B_DARKEN_4_TINT);
|
rgb_color vvdark = tint_color(menuColor, B_DARKEN_4_TINT);
|
||||||
@@ -1479,7 +1479,7 @@ TDragRegion::Draw(BRect)
|
|||||||
void
|
void
|
||||||
TDragRegion::DrawDragRegion()
|
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 menuHilite = tint_color(menuColor, B_HIGHLIGHT_BACKGROUND_TINT);
|
||||||
rgb_color vdark = tint_color(menuColor, B_DARKEN_3_TINT);
|
rgb_color vdark = tint_color(menuColor, B_DARKEN_3_TINT);
|
||||||
rgb_color light = tint_color(menuColor, B_LIGHTEN_2_TINT);
|
rgb_color light = tint_color(menuColor, B_LIGHTEN_2_TINT);
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ TTeamMenuItem::Draw()
|
|||||||
BRect frame(Frame());
|
BRect frame(Frame());
|
||||||
BMenu *menu = Menu();
|
BMenu *menu = Menu();
|
||||||
menu->PushState();
|
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
|
// if not selected or being tracked on, fill with gray
|
||||||
TBarView *barview = (static_cast<TBarApp *>(be_app))->BarView();
|
TBarView *barview = (static_cast<TBarApp *>(be_app))->BarView();
|
||||||
@@ -413,9 +413,10 @@ TTeamMenuItem::DrawContentLabel()
|
|||||||
label = Label();
|
label = Label();
|
||||||
|
|
||||||
TBarView *barview = (static_cast<TBarApp *>(be_app))->BarView();
|
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)
|
if (IsSelected() && IsEnabled() && canHandle)
|
||||||
menu->SetLowColor(tint_color(ui_color(B_MENU_BACKGROUND_COLOR),
|
menu->SetLowColor(tint_color(menu->ViewColor(),
|
||||||
B_HIGHLIGHT_BACKGROUND_TINT));
|
B_HIGHLIGHT_BACKGROUND_TINT));
|
||||||
else
|
else
|
||||||
menu->SetLowColor(menu->ViewColor());
|
menu->SetLowColor(menu->ViewColor());
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ void
|
|||||||
TWindowMenuItem::Draw()
|
TWindowMenuItem::Draw()
|
||||||
{
|
{
|
||||||
if (fExpanded) {
|
if (fExpanded) {
|
||||||
rgb_color menuColor = ui_color(B_MENU_BACKGROUND_COLOR);
|
rgb_color menuColor = Menu()->ViewColor();
|
||||||
BRect frame(Frame());
|
BRect frame(Frame());
|
||||||
BMenu *menu = Menu();
|
BMenu *menu = Menu();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user