From 4e03eeaa477a8d7ca9ca85e62759f9eab2b6d8a9 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Tue, 4 Mar 2008 01:21:00 +0000 Subject: [PATCH] The registrar's shutdown window and BAlert both use a BTextView in order to be able to display multiline panel text (since BStringView can't handle this). However, while they correctly set the background panel color, they neglected to set the font style/color to that used by panel. Fixed. This makes shutdown/restart dialogs properly color sensitive. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24226 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/Alert.cpp | 2 ++ src/servers/registrar/ShutdownProcess.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/kits/interface/Alert.cpp b/src/kits/interface/Alert.cpp index ca988feb48..aabfe9622b 100644 --- a/src/kits/interface/Alert.cpp +++ b/src/kits/interface/Alert.cpp @@ -533,6 +533,8 @@ BAlert::_InitObject(const char* text, const char* button0, const char* button1, textViewRect.OffsetByCopy(B_ORIGIN), B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW); fTextView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); + rgb_color textColor = ui_color(B_PANEL_TEXT_COLOR); + fTextView->SetFontAndColor(be_plain_font, B_FONT_ALL, &textColor); fTextView->SetText(text, strlen(text)); fTextView->MakeEditable(false); fTextView->MakeSelectable(false); diff --git a/src/servers/registrar/ShutdownProcess.cpp b/src/servers/registrar/ShutdownProcess.cpp index 74c226f344..d9cce042d8 100644 --- a/src/servers/registrar/ShutdownProcess.cpp +++ b/src/servers/registrar/ShutdownProcess.cpp @@ -264,6 +264,8 @@ public: if (!fTextView) return B_NO_MEMORY; fTextView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); + rgb_color textColor = ui_color(B_PANEL_TEXT_COLOR); + fTextView->SetFontAndColor(be_plain_font, B_FONT_ALL, &textColor); fTextView->MakeEditable(false); fTextView->MakeSelectable(false); fTextView->SetWordWrap(true);