mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Fixed conflicts after merge with master
This commit is contained in:
commit
69a0a1c96e
5 changed files with 57 additions and 76 deletions
|
@ -220,41 +220,30 @@ void GLCanvas3D::LayersEditing::render_overlay(const GLCanvas3D& canvas) const
|
|||
return;
|
||||
|
||||
const Size& cnv_size = canvas.get_canvas_size();
|
||||
float canvas_w = (float)cnv_size.get_width();
|
||||
float canvas_h = (float)cnv_size.get_height();
|
||||
|
||||
ImGuiWrapper& imgui = *wxGetApp().imgui();
|
||||
imgui.set_next_window_pos(canvas_w - imgui.get_style_scaling() * THICKNESS_BAR_WIDTH, canvas_h, ImGuiCond_Always, 1.0f, 1.0f);
|
||||
imgui.set_next_window_pos(static_cast<float>(cnv_size.get_width()) - imgui.get_style_scaling() * THICKNESS_BAR_WIDTH,
|
||||
static_cast<float>(cnv_size.get_height()), ImGuiCond_Always, 1.0f, 1.0f);
|
||||
|
||||
imgui.begin(_L("Variable layer height"), ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoCollapse);
|
||||
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ImGuiWrapper::COL_ORANGE_LIGHT);
|
||||
imgui.text(_L("Left mouse button:"));
|
||||
ImGui::PopStyleColor();
|
||||
imgui.text_colored(ImGuiWrapper::COL_ORANGE_LIGHT, _L("Left mouse button:"));
|
||||
ImGui::SameLine();
|
||||
imgui.text(_L("Add detail"));
|
||||
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ImGuiWrapper::COL_ORANGE_LIGHT);
|
||||
imgui.text(_L("Right mouse button:"));
|
||||
ImGui::PopStyleColor();
|
||||
imgui.text_colored(ImGuiWrapper::COL_ORANGE_LIGHT, _L("Right mouse button:"));
|
||||
ImGui::SameLine();
|
||||
imgui.text(_L("Remove detail"));
|
||||
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ImGuiWrapper::COL_ORANGE_LIGHT);
|
||||
imgui.text(_L("Shift + Left mouse button:"));
|
||||
ImGui::PopStyleColor();
|
||||
imgui.text_colored(ImGuiWrapper::COL_ORANGE_LIGHT, _L("Shift + Left mouse button:"));
|
||||
ImGui::SameLine();
|
||||
imgui.text(_L("Reset to base"));
|
||||
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ImGuiWrapper::COL_ORANGE_LIGHT);
|
||||
imgui.text(_L("Shift + Right mouse button:"));
|
||||
ImGui::PopStyleColor();
|
||||
imgui.text_colored(ImGuiWrapper::COL_ORANGE_LIGHT, _L("Shift + Right mouse button:"));
|
||||
ImGui::SameLine();
|
||||
imgui.text(_L("Smoothing"));
|
||||
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ImGuiWrapper::COL_ORANGE_LIGHT);
|
||||
imgui.text(_L("Mouse wheel:"));
|
||||
ImGui::PopStyleColor();
|
||||
imgui.text_colored(ImGuiWrapper::COL_ORANGE_LIGHT, _L("Mouse wheel:"));
|
||||
ImGui::SameLine();
|
||||
imgui.text(_L("Increase/decrease edit area"));
|
||||
|
||||
|
@ -266,8 +255,7 @@ void GLCanvas3D::LayersEditing::render_overlay(const GLCanvas3D& canvas) const
|
|||
float text_align = ImGui::GetCursorPosX();
|
||||
ImGui::AlignTextToFramePadding();
|
||||
imgui.text(_L("Quality / Speed"));
|
||||
if (ImGui::IsItemHovered())
|
||||
{
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::TextUnformatted(_L("Higher print quality versus higher print speed.").ToUTF8());
|
||||
ImGui::EndTooltip();
|
||||
|
@ -1408,8 +1396,7 @@ void GLCanvas3D::Tooltip::render(const Vec2d& mouse_position, GLCanvas3D& canvas
|
|||
#if ENABLE_SLOPE_RENDERING
|
||||
void GLCanvas3D::Slope::render() const
|
||||
{
|
||||
if (m_dialog_shown)
|
||||
{
|
||||
if (m_dialog_shown) {
|
||||
const std::array<float, 2>& z_range = m_volumes.get_slope_z_range();
|
||||
std::array<float, 2> angle_range = { Geometry::rad2deg(::acos(z_range[0])) - 90.0f, Geometry::rad2deg(::acos(z_range[1])) - 90.0f };
|
||||
bool modified = false;
|
||||
|
@ -1417,9 +1404,9 @@ void GLCanvas3D::Slope::render() const
|
|||
ImGuiWrapper& imgui = *wxGetApp().imgui();
|
||||
const Size& cnv_size = m_canvas.get_canvas_size();
|
||||
imgui.set_next_window_pos((float)cnv_size.get_width(), (float)cnv_size.get_height(), ImGuiCond_Always, 1.0f, 1.0f);
|
||||
imgui.begin(_(L("Slope visualization")), nullptr, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse);
|
||||
imgui.begin(_L("Slope visualization"), nullptr, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse);
|
||||
|
||||
imgui.text(_(L("Facets' slope range (degrees)")) + ":");
|
||||
imgui.text(_L("Facets' slope range (degrees)") + ":");
|
||||
|
||||
ImGui::PushStyleColor(ImGuiCol_FrameBg, ImVec4(0.75f, 0.0f, 0.0f, 0.5f));
|
||||
ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, ImVec4(1.0f, 0.0f, 0.0f, 0.5f));
|
||||
|
@ -1431,8 +1418,7 @@ void GLCanvas3D::Slope::render() const
|
|||
float slope_bound = 90.f - angle_range[1];
|
||||
bool mod = ImGui::SliderFloat("##red", &slope_bound, 0.0f, 90.0f, "%.1f");
|
||||
angle_range[1] = 90.f - slope_bound;
|
||||
if (mod)
|
||||
{
|
||||
if (mod) {
|
||||
modified = true;
|
||||
if (angle_range[0] > angle_range[1])
|
||||
angle_range[0] = angle_range[1];
|
||||
|
@ -1440,15 +1426,14 @@ void GLCanvas3D::Slope::render() const
|
|||
|
||||
ImGui::PopStyleColor(4);
|
||||
ImGui::PushStyleColor(ImGuiCol_FrameBg, ImVec4(0.75f, 0.75f, 0.0f, 0.5f));
|
||||
ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, ImVec4(1.0f, 1.0f, 0.0f, 0.5f));
|
||||
ImGui::PushStyleColor(ImGuiCol_FrameBgActive, ImVec4(0.85f, 0.85f, 0.0f, 0.5f));
|
||||
ImGui::PushStyleColor(ImGuiCol_SliderGrab, ImVec4(0.25f, 0.25f, 0.0f, 1.0f));
|
||||
ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, ImVec4(1.0f, 1.0f, 0.0f, 0.5f));
|
||||
ImGui::PushStyleColor(ImGuiCol_FrameBgActive, ImVec4(0.85f, 0.85f, 0.0f, 0.5f));
|
||||
ImGui::PushStyleColor(ImGuiCol_SliderGrab, ImVec4(0.25f, 0.25f, 0.0f, 1.0f));
|
||||
|
||||
slope_bound = 90.f - angle_range[0];
|
||||
mod = ImGui::SliderFloat("##yellow", &slope_bound, 0.0f, 90.0f, "%.1f");
|
||||
angle_range[0] = 90.f - slope_bound;
|
||||
if (mod)
|
||||
{
|
||||
if (mod) {
|
||||
modified = true;
|
||||
if (angle_range[1] < angle_range[0])
|
||||
angle_range[1] = angle_range[0];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue