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:
|
case B_COLORS_UPDATED:
|
||||||
{
|
{
|
||||||
// Change the bar color IF we don't have an application-set color.
|
rgb_color color;
|
||||||
if ((fInternalFlags & kCustomBarColor) == 0) {
|
if (message->FindColor(ui_color_name(B_STATUS_BAR_COLOR), &color) == B_OK) {
|
||||||
message->FindColor(ui_color_name(B_STATUS_BAR_COLOR),
|
// Change the bar color IF we don't have an application-set color.
|
||||||
&fBarColor);
|
if ((fInternalFlags & kCustomBarColor) == 0)
|
||||||
|
fBarColor = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user