mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-11 01:41:03 +00:00
Merge remote-tracking branch 'upstream/main' into feedback
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include "GUI_Utils.hpp"
|
||||
#include "GUI.hpp"
|
||||
#include "GLCanvas3D.hpp"
|
||||
#include "FilamentGroupPopup.hpp"
|
||||
#include "GLToolbar.hpp"
|
||||
#include "GUI_Preview.hpp"
|
||||
#include "libslic3r/Print.hpp"
|
||||
@@ -33,7 +34,7 @@
|
||||
#endif // ENABLE_ACTUAL_SPEED_DEBUG
|
||||
#include <imgui/imgui_internal.h>
|
||||
|
||||
#include <GL/glew.h>
|
||||
#include <glad/gl.h>
|
||||
#include <boost/log/trivial.hpp>
|
||||
#include <boost/algorithm/string/split.hpp>
|
||||
#include <boost/nowide/cstdio.hpp>
|
||||
@@ -3081,13 +3082,12 @@ void GCodeViewer::render_legend_color_arr_recommen(float window_padding)
|
||||
|
||||
auto link_filament_group_wiki = [&](const std::string& label) {
|
||||
ImVec2 wiki_part_size = ImGui::CalcTextSize(label.c_str());
|
||||
|
||||
ImColor HyperColor = ImColor(0, 150, 136, 255).Value;
|
||||
ImColor HyperColor = ImColor(0, 150, 136, 255); // ORCA match color
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, HyperColor.Value);
|
||||
imgui.text(label.c_str());
|
||||
ImGui::PopStyleColor();
|
||||
|
||||
// underline
|
||||
// ORCA use underline to match hyperlink style
|
||||
ImVec2 lineEnd = ImGui::GetItemRectMax();
|
||||
lineEnd.y -= 2.0f;
|
||||
ImVec2 lineStart = lineEnd;
|
||||
@@ -3096,8 +3096,7 @@ void GCodeViewer::render_legend_color_arr_recommen(float window_padding)
|
||||
// click behavior
|
||||
if (ImGui::IsMouseHoveringRect(ImGui::GetItemRectMin(), ImGui::GetItemRectMax(), true)) {
|
||||
if (ImGui::IsMouseClicked(ImGuiMouseButton_Left)) {
|
||||
std::string wiki_path = Slic3r::resources_dir() + "/wiki/filament_group_wiki_zh.html";
|
||||
wxLaunchDefaultBrowser(wxString(wiki_path.c_str()));
|
||||
open_filament_group_wiki();
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -3304,8 +3303,9 @@ void GCodeViewer::render_legend_color_arr_recommen(float window_padding)
|
||||
link_text(_u8L("Regroup filament"));
|
||||
|
||||
ImGui::SameLine();
|
||||
ImGui::SetCursorPosX(ImGui::GetWindowContentRegionWidth() - window_padding - ImGui::CalcTextSize("Tips").x);
|
||||
link_filament_group_wiki(_u8L("Tips"));
|
||||
std::string wiki_str = _u8L("Wiki Guide"); // ORCA
|
||||
ImGui::SetCursorPosX(ImGui::GetWindowContentRegionWidth() - window_padding - ImGui::CalcTextSize(wiki_str.c_str()).x);
|
||||
link_filament_group_wiki(wiki_str);
|
||||
|
||||
ImGui::EndChild();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user