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:
Augustin Cavalier
2025-06-17 20:51:30 -04:00
parent 8de71284ed
commit 265302aefe
+5 -4
View File
@@ -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;