[refactor] add namespace 'crossdesk' to codebase

This commit is contained in:
dijunkun
2025-10-27 21:09:39 +08:00
parent 3b34c26555
commit 401bfe4483
68 changed files with 313 additions and 606 deletions

View File

@@ -3,6 +3,8 @@
#include "rd_log.h"
#include "render.h"
namespace crossdesk {
int CountDigits(int number) {
if (number == 0) return 1;
return (int)std::floor(std::log10(std::abs(number))) + 1;
@@ -324,3 +326,4 @@ int Render::NetTrafficStats(std::shared_ptr<SubStreamWindowProperties>& props) {
return 0;
}
} // namespace crossdesk

View File

@@ -1,6 +1,8 @@
#include "localization.h"
#include "render.h"
namespace crossdesk {
int Render::StatusBar() {
ImGui::PushStyleColor(ImGuiCol_ChildBg, ImVec4(1.0f, 1.0f, 1.0f, 1.0f));
static bool a, b, c, d, e;
@@ -35,4 +37,5 @@ int Render::StatusBar() {
ImGui::PopStyleColor();
ImGui::EndChild();
return 0;
}
}
} // namespace crossdesk

View File

@@ -4,6 +4,8 @@
#define BUTTON_PADDING 36.0f
namespace crossdesk {
int Render::TitleBar(bool main_window) {
ImGui::PushStyleColor(ImGuiCol_MenuBarBg, ImVec4(1.0f, 1.0f, 1.0f, 0.0f));
ImGui::PushStyleColor(ImGuiCol_ChildBg, ImVec4(1.0f, 1.0f, 1.0f, 1.0f));
@@ -171,4 +173,5 @@ int Render::TitleBar(bool main_window) {
ImGui::EndChild();
ImGui::PopStyleColor();
return 0;
}
}
} // namespace crossdesk