mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-26 04:12:07 +00:00
ENH:refine GLCanvas update dark mode logic
Change-Id: Id4c4f00a18fa0672eab528a6819b6665031a8915
This commit is contained in:
@@ -208,9 +208,8 @@ void GLGizmoSeam::on_render_input_window(float x, float y, float bottom_limit)
|
||||
ImGui::AlignTextToFramePadding();
|
||||
m_imgui->text(m_desc.at("cursor_type"));
|
||||
std::array<wchar_t, 2> tool_ids = { ImGui::CircleButtonIcon, ImGui::SphereButtonIcon };
|
||||
bool dark_mode = wxGetApp().app_config->get("dark_color_mode") == "1";
|
||||
std::array<wchar_t, 2> icons;
|
||||
if (dark_mode)
|
||||
if (m_is_dark_mode)
|
||||
icons = { ImGui::CircleButtonDarkIcon, ImGui::SphereButtonDarkIcon};
|
||||
else
|
||||
icons = { ImGui::CircleButtonIcon, ImGui::SphereButtonIcon };
|
||||
@@ -222,9 +221,9 @@ void GLGizmoSeam::on_render_input_window(float x, float y, float bottom_limit)
|
||||
if (i != 0) ImGui::SameLine((empty_button_width + m_imgui->scaled(1.75f)) * i + m_imgui->scaled(1.3f));
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 0.0);
|
||||
if (m_current_tool == tool_ids[i]) {
|
||||
ImGui::PushStyleColor(ImGuiCol_Button, dark_mode ? ImVec4(43 / 255.0f, 64 / 255.0f, 54 / 255.0f, 1.00f) : ImVec4(0.86f, 0.99f, 0.91f, 1.00f)); // r, g, b, a
|
||||
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, dark_mode ? ImVec4(43 / 255.0f, 64 / 255.0f, 54 / 255.0f, 1.00f) : ImVec4(0.86f, 0.99f, 0.91f, 1.00f));
|
||||
ImGui::PushStyleColor(ImGuiCol_ButtonActive, dark_mode ? ImVec4(43 / 255.0f, 64 / 255.0f, 54 / 255.0f, 1.00f) : ImVec4(0.86f, 0.99f, 0.91f, 1.00f));
|
||||
ImGui::PushStyleColor(ImGuiCol_Button, m_is_dark_mode ? ImVec4(43 / 255.0f, 64 / 255.0f, 54 / 255.0f, 1.00f) : ImVec4(0.86f, 0.99f, 0.91f, 1.00f)); // r, g, b, a
|
||||
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, m_is_dark_mode ? ImVec4(43 / 255.0f, 64 / 255.0f, 54 / 255.0f, 1.00f) : ImVec4(0.86f, 0.99f, 0.91f, 1.00f));
|
||||
ImGui::PushStyleColor(ImGuiCol_ButtonActive, m_is_dark_mode ? ImVec4(43 / 255.0f, 64 / 255.0f, 54 / 255.0f, 1.00f) : ImVec4(0.86f, 0.99f, 0.91f, 1.00f));
|
||||
ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0.00f, 0.68f, 0.26f, 1.00f));
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 1.0);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 1.0);
|
||||
|
||||
Reference in New Issue
Block a user