更新 NotificationManager.cpp

This commit is contained in:
76Octane
2023-06-10 15:10:54 +08:00
parent 902d2e8332
commit 99b2f2b529

View File

@@ -238,15 +238,18 @@ bool NotificationManager::PopNotification::push_background_color()
if (m_data.level == NotificationLevel::ErrorNotificationLevel) { if (m_data.level == NotificationLevel::ErrorNotificationLevel) {
// ImVec4 backcolor = ImGui::GetStyleColorVec4(ImGuiCol_WindowBg); // ImVec4 backcolor = ImGui::GetStyleColorVec4(ImGuiCol_WindowBg);
ImVec4 backcolor(0.27f, 0.47f, 1.0f, 0.5f); ImVec4 backcolor(0.27f, 0.47f, 1.0f, 0.5f);
backcolor.x += 0.3f; backcolor.x += 0.73f;
backcolor.y += 0.03f;
backcolor.z -= 1.0f;
push_style_color(ImGuiCol_WindowBg, backcolor, m_state == EState::FadingOut, m_current_fade_opacity); push_style_color(ImGuiCol_WindowBg, backcolor, m_state == EState::FadingOut, m_current_fade_opacity);
return true; return true;
} }
if (m_data.level == NotificationLevel::WarningNotificationLevel) { if (m_data.level == NotificationLevel::WarningNotificationLevel) {
// ImVec4 backcolor = ImGui::GetStyleColorVec4(ImGuiCol_WindowBg); // ImVec4 backcolor = ImGui::GetStyleColorVec4(ImGuiCol_WindowBg);
ImVec4 backcolor(0.27f, 0.47f, 1.0f, 0.5f); ImVec4 backcolor(0.27f, 0.47f, 1.0f, 0.5f);
backcolor.x += 0.3f; backcolor.x += 0.73f;
backcolor.y += 0.15f; backcolor.y -= 0.47f;
backcolor.z -= 1.0f;
push_style_color(ImGuiCol_WindowBg, backcolor, m_state == EState::FadingOut, m_current_fade_opacity); push_style_color(ImGuiCol_WindowBg, backcolor, m_state == EState::FadingOut, m_current_fade_opacity);
return true; return true;
} }