Opened 16 months ago
BMenu::DrawBackground contains unused code
|Reported by:||ahwayakchih||Owned by:||nobody|
|Has a Patch:||no||Platform:||All|
I'm new to the BControlLooks stuff, so i'm sorry if i'm mistaken, but it looks like BMenu::DrawBackground prepares flags that it never uses.
uint32 flags = 0; if (!IsEnabled()) flags |= BControlLook::B_DISABLED; if (IsFocus()) flags |= BControlLook::B_FOCUSED;
be_control_look->DrawMenuBackground(this, rect, updateRect, base, 0, borders);
flags is not used at all.
I noticed that because in my old code, i was drawing menu item background by calling FillRect with HighColor set to B_MENU_BACKGROUND_COLOR and on Haiku it kept showing up a tiny bit darker than the menu that does not use custom draw logic. So i looked into the BMenu sources to check how it draws background by default :). Looks like be_control_look changes something, even though in system theme i have menu color set to default (216,216,216).