refactor: replace 60+ inline color literals with shared ui::colors constants

Use kRed, kBrightGreen, kDarkGray, kLightGray from ui_colors.hpp across
8 UI files, eliminating duplicate ImVec4 color definitions throughout
the UI layer.
This commit is contained in:
Kelsi 2026-03-25 12:29:44 -07:00
parent 4d46641ac2
commit b892dca0e5
8 changed files with 58 additions and 52 deletions

View file

@ -1,4 +1,5 @@
#include "ui/auth_screen.hpp"
#include "ui/ui_colors.hpp"
#include "auth/crypto.hpp"
#include "core/application.hpp"
#include "core/logger.hpp"
@ -393,9 +394,9 @@ void AuthScreen::render(auth::AuthHandler& authHandler) {
// Connection status
if (!statusMessage.empty()) {
if (statusIsError) {
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 0.3f, 0.3f, 1.0f));
ImGui::PushStyleColor(ImGuiCol_Text, ui::colors::kRed);
} else {
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.3f, 1.0f, 0.3f, 1.0f));
ImGui::PushStyleColor(ImGuiCol_Text, ui::colors::kBrightGreen);
}
ImGui::TextWrapped("%s", statusMessage.c_str());
ImGui::PopStyleColor();