From 8ed12a8023299ddbb29df650cdca9213c53c868b Mon Sep 17 00:00:00 2001 From: Andrew Sun Date: Sat, 20 Sep 2025 18:52:48 -0400 Subject: [PATCH] Styling changes for position window --- resources/images/horizontal_hide.svg | 2 +- resources/images/horizontal_show.svg | 2 +- src/slic3r/GUI/GCodeViewer.cpp | 17 ++++++++++------- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/resources/images/horizontal_hide.svg b/resources/images/horizontal_hide.svg index 009c882d65..28f3e27f3e 100644 --- a/resources/images/horizontal_hide.svg +++ b/resources/images/horizontal_hide.svg @@ -38,7 +38,7 @@ inkscape:window-maximized="1" inkscape:current-layer="Layer_1" /> get_current_canvas3D()->get_canvas_size(); imgui.set_next_window_pos(0.5f * static_cast(canvas_width), static_cast(canvas_height), ImGuiCond_Always, 0.5f, 1.0f); + ImGui::PushStyleColor(ImGuiCol_Button, ImGuiWrapper::COL_BUTTON_BACKGROUND); + ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImGuiWrapper::COL_BUTTON_ACTIVE); + ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImGuiWrapper::COL_BUTTON_HOVERED); ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 0.0f); - ImGui::SetNextWindowBgAlpha(0.25f); + ImGui::SetNextWindowBgAlpha(0.8f); imgui.begin(std::string("ToolPosition"), ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoMove); ImGui::AlignTextToFramePadding(); - ImGuiWrapper::text_colored(ImGuiWrapper::COL_ORANGE_LIGHT, _u8L("Position") + ":"); + ImGuiWrapper::text_colored(ImGuiWrapper::COL_ORCA, _u8L("Position") + ":"); ImGui::SameLine(); libvgcode::PathVertex vertex = viewer->get_current_vertex(); size_t vertex_id = viewer->get_current_vertex_id(); @@ -335,7 +338,7 @@ void GCodeViewer::SequentialView::Marker::render_position_window(const libvgcode auto append_table_row = [](const std::string& label, std::function value_callback) { ImGui::TableNextRow(); ImGui::TableSetColumnIndex(0); - ImGuiWrapper::text_colored(ImGuiWrapper::COL_ORANGE_LIGHT, label); + ImGuiWrapper::text_colored(ImGuiWrapper::COL_ORCA, label); ImGui::TableSetColumnIndex(1); value_callback(); }; @@ -454,10 +457,10 @@ void GCodeViewer::SequentialView::Marker::render_position_window(const libvgcode ImGui::TableSetBgColor(ImGuiTableBgTarget_RowBg0, row_bg_color); ImGui::TableSetColumnIndex(0); sprintf(buff, "%.3f", item.pos); - imgui.text_colored(highlight ? ImGuiWrapper::COL_ORANGE_LIGHT : ImGuiWrapper::to_ImVec4(ColorRGBA::WHITE()), buff); + imgui.text_colored(highlight ? ImGuiWrapper::COL_ORCA : ImGuiWrapper::to_ImVec4(ColorRGBA::WHITE()), buff); ImGui::TableSetColumnIndex(1); sprintf(buff, "%.1f", item.speed); - imgui.text_colored(highlight ? ImGuiWrapper::COL_ORANGE_LIGHT : ImGuiWrapper::to_ImVec4(ColorRGBA::WHITE()), buff); + imgui.text_colored(highlight ? ImGuiWrapper::COL_ORCA : ImGuiWrapper::to_ImVec4(ColorRGBA::WHITE()), buff); ++counter; } ImGui::EndTable(); @@ -491,9 +494,9 @@ void GCodeViewer::SequentialView::Marker::render_position_window(const libvgcode const Size cnv_size = wxGetApp().plater()->get_current_canvas3D()->get_canvas_size(); imgui.set_next_window_pos(0.5f * static_cast(cnv_size.get_width()), static_cast(cnv_size.get_height()), ImGuiCond_Always, 0.5f, 1.0f); ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 0.0f); - ImGui::SetNextWindowBgAlpha(0.25f); + ImGui::SetNextWindowBgAlpha(0.8f); imgui.begin(std::string("ToolPosition"), ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoMove); - imgui.text_colored(ImGuiWrapper::COL_ORANGE_LIGHT, _u8L("Tool position") + ":"); + imgui.text_colored(ImGuiWrapper::COL_ORCA, _u8L("Tool position") + ":"); ImGui::SameLine(); char buf[1024]; const Vec3f position = m_world_position + m_world_offset + m_z_offset * Vec3f::UnitZ();