BStatusBar: Fix handling of B_COLORS_UPDATED.
It didn't check if the message actually contained the status bar color, and if it didn't, we'd wind up with a black color instead.
This commit is contained in:
@@ -382,10 +382,11 @@ BStatusBar::MessageReceived(BMessage *message)
|
||||
|
||||
case B_COLORS_UPDATED:
|
||||
{
|
||||
// Change the bar color IF we don't have an application-set color.
|
||||
if ((fInternalFlags & kCustomBarColor) == 0) {
|
||||
message->FindColor(ui_color_name(B_STATUS_BAR_COLOR),
|
||||
&fBarColor);
|
||||
rgb_color color;
|
||||
if (message->FindColor(ui_color_name(B_STATUS_BAR_COLOR), &color) == B_OK) {
|
||||
// Change the bar color IF we don't have an application-set color.
|
||||
if ((fInternalFlags & kCustomBarColor) == 0)
|
||||
fBarColor = color;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user