Compare commits

..
Author SHA1 Message Date
SoftFever 019f6677b9 Merge branch 'main' into feature/texdisp-help-links 2026-10-02 20:20:06 +08:00
ExPikaPaka 561c9e38e0 Reserve header width for the two new icons 2026-10-02 09:10:46 +02:00
ExPikaPaka 92de8d3eae Link the texture displacement guide and wiki from the gizmo panel
Finding either piece of documentation currently means knowing it exists and
going looking for it outside the application, which is the hardest moment to
do that: the panel has a lot of controls and the feature is new.

Add two borderless icon buttons to the panel header, next to the dock toggle,
opening the video walkthrough and the wiki page in the default browser. Both
icons follow the set's existing convention of a grey outline with a teal
accent, so they read as part of the same panel.
2026-10-02 09:05:35 +02:00
5 changed files with 23 additions and 5 deletions
+1 -3
View File
@@ -823,9 +823,7 @@ if(SLIC3R_STATIC)
set(TBB_STATIC 1)
endif()
set(TBB_DEBUG 1)
if ("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo" OR MSVC)
set(CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO RelWithDebInfo Release "")
endif()
set(CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO RelWithDebInfo Release "")
find_package(TBB REQUIRED)
# include_directories(SYSTEM ${TBB_INCLUDE_DIRS})
# add_definitions(${TBB_DEFINITIONS})
+5 -1
View File
@@ -19,7 +19,11 @@ if(Qhull_FOUND)
message(STATUS "Using qhull from system.")
if(SLIC3R_STATIC)
slic3r_remap_configs("Qhull::qhullcpp;Qhull::qhullstatic_r" RelWithDebInfo Release)
target_link_libraries(qhull INTERFACE Qhull::qhullcpp Qhull::qhullstatic_r)
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
target_link_libraries(qhull INTERFACE Qhull::qhullcpp_d Qhull::qhullstatic_rd)
else()
target_link_libraries(qhull INTERFACE Qhull::qhullcpp Qhull::qhullstatic_r)
endif()
else()
slic3r_remap_configs("Qhull::qhullcpp;Qhull::qhull_r" RelWithDebInfo Release)
target_link_libraries(qhull INTERFACE Qhull::qhullcpp Qhull::qhull_r)
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><rect x="0.5" y="2.5" width="15" height="11" rx="2.5" style="fill:none;stroke:#949494;stroke-linecap:round;stroke-linejoin:round"/><path d="M6.5 5.5l4.5 2.5-4.5 2.5z" style="fill:none;stroke:#009688;stroke-linecap:round;stroke-linejoin:round"/></svg>

After

Width:  |  Height:  |  Size: 334 B

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M1.5 2.5h4a2 2 0 0 1 2 2v9a1.5 1.5 0 0 0-1.5-1.5h-4.5zM14.5 2.5h-4a2 2 0 0 0-2 2v9a1.5 1.5 0 0 1 1.5-1.5h4.5z" style="fill:none;stroke:#949494;stroke-linecap:round;stroke-linejoin:round"/><path d="M10.5 5.5h2.5M10.5 7.5h2.5M3 5.5h2.5M3 7.5h2.5" style="fill:none;stroke:#009688;stroke-linecap:round;stroke-linejoin:round"/></svg>

After

Width:  |  Height:  |  Size: 421 B

@@ -3396,6 +3396,8 @@ void GLGizmoTextureDisplacement::ensure_panel_icons()
"texture_displacement_adjust.svg", "canvas_drag.svg", "texture_displacement_move_up.svg",
"texture_displacement_move_down.svg", "texture_displacement_drag.svg",
"texture_displacement_select_all.svg", "texture_displacement_erase_all.svg",
// Header help links: the video walkthrough and the wiki page.
"texture_displacement_video_guide.svg", "texture_displacement_wiki.svg",
};
std::vector<std::string> paths;
paths.reserve(names.size());
@@ -5509,7 +5511,10 @@ void GLGizmoTextureDisplacement::on_render_input_window(float x, float y, float
const float seg_pad = m_imgui->scaled(0.5f);
const float seg_w[2] = { ImGui::CalcTextSize(labels[0].c_str()).x + 2.f * seg_pad, ImGui::CalcTextSize(labels[1].c_str()).x + 2.f * seg_pad };
ImGui::SameLine();
ImGui::SetCursorPosX(std::max(ImGui::GetCursorPosX(), x0 + panel_w - (seg_w[0] + seg_w[1] + gap_s + icon_sm)));
// Three icons now follow the segmented control (video guide, wiki, dock toggle), each preceded by
// its own gap - the reserved width has to cover all of them or the cluster runs past the panel edge.
ImGui::SetCursorPosX(std::max(ImGui::GetCursorPosX(),
x0 + panel_w - (seg_w[0] + seg_w[1] + 3.f * (gap_s + icon_sm))));
// Standard / Pro is a mode, not an option: Standard hides every mesh-preparation control and folds
// the whole recipe into Bake, Pro shows all of it and hands the ordering to the user.
@@ -5551,6 +5556,15 @@ void GLGizmoTextureDisplacement::on_render_input_window(float x, float y, float
ImGui::GetWindowDrawList()->AddRect(seg_min, ImVec2(ImGui::GetItemRectMax().x, seg_min.y + frame_h),
ImGui::GetColorU32(col_frame), style.FrameRounding);
ImGui::SameLine(0.f, gap_s);
if (icon_button(807, "texture_displacement_video_guide.svg", icon_sm, _L("Video guide"),
_L("Watch the texture displacement walkthrough on YouTube. Opens in your browser.")))
wxLaunchDefaultBrowser("https://www.youtube.com/watch?v=D7w3tG1kdvE");
ImGui::SameLine(0.f, gap_s);
if (icon_button(808, "texture_displacement_wiki.svg", icon_sm, _L("Documentation"),
_L("Open the texture displacement page of the OrcaSlicer wiki. Opens in your browser.")))
wxLaunchDefaultBrowser("https://www.orcaslicer.com/wiki/print_prepare/prepare_texture_displacement.html");
ImGui::SameLine(0.f, gap_s);
if (icon_button(806, "canvas_drag.svg", icon_sm, m_undocked ? _L("Dock panel") : _L("Undock panel"),
_L("Detach this panel so it can be dragged anywhere over the 3D view, or dock it back beside "