mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-09 08:41:14 +00:00
Unify wiki & video guide buttons (#16159)
* init * fix build * Update PrintOptionsDialog.cpp * Update TroubleshootDialog.cpp
This commit is contained in:
@@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 25 25"><circle cx="9.5" cy="12.5" r="9.5" style="fill:#009688"/><path d="M6.5,10.5a3,3,0,0,1,6,0c0,3-3,2-3,4v1" style="fill:none;stroke:#e6e6e6;stroke-linecap:round;stroke-linejoin:round"/><rect x="9" y="17" width="1" height="1" style="fill:#e6e6e6"/></svg>
|
||||
<?xml version="1.0" encoding="UTF-8"?><svg id="a" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 15"><rect x="7" y="12" width="1" height="1" style="fill:#fefefe;"/><path d="M4.5,5.5c0-1.71,1.43-3.09,3.16-3,1.62.08,2.84,1.54,2.84,3.17h0c0,.61-.25,1.2-.69,1.62l-2.31,2.24v.97" style="fill:none; stroke:#fefefe; stroke-linecap:round; stroke-linejoin:round;"/></svg>
|
||||
|
Before Width: | Height: | Size: 333 B After Width: | Height: | Size: 366 B |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 25 25"><circle cx="9.5" cy="12.5" r="9.5" style="fill:#33aba1"/><path d="M6.5,10.5a3,3,0,0,1,6,0c0,3-3,2-3,4v1" style="fill:none;stroke:#e6e6e6;stroke-linecap:round;stroke-linejoin:round"/><rect x="9" y="17" width="1" height="1" style="fill:#e6e6e6"/></svg>
|
||||
|
Before Width: | Height: | Size: 333 B |
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><svg id="a" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 15"><path d="M12.31,8l-8.14,4.16c-.31.16-.67-.07-.67-.41V3.27c0-.35.37-.57.68-.41l8.14,4.32c.33.17.33.65,0,.82Z" style="fill:none; stroke:#fefefe; stroke-linecap:round; stroke-linejoin:round;"/></svg>
|
||||
|
After Width: | Height: | Size: 301 B |
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><svg id="a" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 15"><path d="M7.5,3.5c2-2,5.1-1,6-1" style="fill:none; stroke:#fefefe; stroke-linecap:round; stroke-linejoin:round;"/><path d="M7.5,12.5c2-2,5.1-1,6-1" style="fill:none; stroke:#fefefe; stroke-linecap:round; stroke-linejoin:round;"/><path d="M7.5,3.5C5.5,1.5,2.4,2.5,1.5,2.5" style="fill:none; stroke:#fefefe; stroke-linecap:round; stroke-linejoin:round;"/><path d="M7.5,12.5c-2-2-5.1-1-6-1" style="fill:none; stroke:#fefefe; stroke-linecap:round; stroke-linejoin:round;"/><line x1="13.5" y1="11.5" x2="13.5" y2="2.5" style="fill:none; stroke:#fefefe; stroke-linecap:round; stroke-linejoin:round;"/><line x1="7.5" y1="12.5" x2="7.5" y2="3.5" style="fill:none; stroke:#fefefe; stroke-linecap:round; stroke-linejoin:round;"/><line x1="1.5" y1="11.5" x2="1.5" y2="2.5" style="fill:none; stroke:#fefefe; stroke-linecap:round; stroke-linejoin:round;"/></svg>
|
||||
|
After Width: | Height: | Size: 954 B |
@@ -19,7 +19,6 @@
|
||||
#include "slic3r/GUI/Widgets/Label.hpp"
|
||||
#include <utility>
|
||||
#include "slic3r/GUI/wxExtensions.hpp"
|
||||
#include "slic3r/GUI/Widgets/HyperLink.hpp"
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
#include "slic3r/GUI/DeviceCore/DevDefs.h"
|
||||
@@ -48,6 +47,7 @@
|
||||
#include <wx/panel.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/utils.h>
|
||||
#include <wx/valtext.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/peninfobase.h>
|
||||
@@ -103,6 +103,14 @@ void AMSMaterialsSetting::create()
|
||||
|
||||
m_sizer_button->Add(0, 0, 1, wxEXPAND, 0);
|
||||
|
||||
// Orca: link to the Orca Slicer pressure-advance wiki (region-agnostic).
|
||||
m_wiki_ctrl = new Button(this, "", "toolbar_wiki", 0, 15);
|
||||
auto wiki_url = "https://www.orcaslicer.com/wiki/pressure_advance_calib";
|
||||
m_wiki_ctrl->SetToolTip(_L("Wiki Guide") + "\n" + wiki_url);
|
||||
m_wiki_ctrl->SetStyle(ButtonStyle::Confirm, ButtonType::Circle);
|
||||
m_wiki_ctrl->SetCanFocus(false);
|
||||
m_wiki_ctrl->Bind(wxEVT_LEFT_DOWN, ([wiki_url](auto& e) {wxLaunchDefaultBrowser(wiki_url);}));
|
||||
|
||||
m_button_confirm = new Button(this, _L("Confirm"));
|
||||
m_button_confirm->SetStyle(ButtonStyle::Confirm, ButtonType::Choice);
|
||||
m_button_confirm->Bind(wxEVT_BUTTON, &AMSMaterialsSetting::on_select_ok, this);
|
||||
@@ -115,8 +123,9 @@ void AMSMaterialsSetting::create()
|
||||
m_button_close->SetStyle(ButtonStyle::Regular, ButtonType::Choice);
|
||||
m_button_close->Bind(wxEVT_BUTTON, &AMSMaterialsSetting::on_select_close, this);
|
||||
|
||||
m_sizer_button->Add(m_button_confirm, 0, wxALIGN_CENTER | wxRIGHT, FromDIP(20));
|
||||
m_sizer_button->Add(m_button_reset, 0, wxALIGN_CENTER | wxRIGHT, FromDIP(20));
|
||||
m_sizer_button->Add(m_wiki_ctrl, 0, wxALIGN_CENTER | wxRIGHT, FromDIP(20));
|
||||
m_sizer_button->Add(m_button_confirm, 0, wxALIGN_CENTER | wxRIGHT, FromDIP(10));
|
||||
m_sizer_button->Add(m_button_reset, 0, wxALIGN_CENTER | wxRIGHT, FromDIP(10));
|
||||
m_sizer_button->Add(m_button_close, 0, wxALIGN_CENTER, 0);
|
||||
|
||||
m_sizer_main->Add(m_panel_normal, 0, wxALL, FromDIP(2));
|
||||
@@ -340,11 +349,7 @@ void AMSMaterialsSetting::create_panel_kn(wxWindow* parent)
|
||||
m_ratio_text->SetForegroundColour(wxColour(50, 58, 61));
|
||||
m_ratio_text->SetFont(Label::Head_14);
|
||||
|
||||
// Orca: link to the Orca Slicer pressure-advance wiki (region-agnostic).
|
||||
wxString link_url = "https://www.orcaslicer.com/wiki/pressure_advance_calib";
|
||||
m_wiki_ctrl = new HyperLink(parent, _L("Wiki Guide"), link_url);
|
||||
cali_title_sizer->Add(m_ratio_text, 0, wxALIGN_CENTER_VERTICAL);
|
||||
cali_title_sizer->Add(m_wiki_ctrl, 0, wxALIGN_CENTER_VERTICAL);
|
||||
|
||||
wxBoxSizer *m_sizer_cali_resutl = new wxBoxSizer(wxHORIZONTAL);
|
||||
// pa profile
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include "Widgets/CheckBox.hpp"
|
||||
#include "Widgets/ComboBox.hpp"
|
||||
#include "Widgets/TextInput.hpp"
|
||||
#include "Widgets/HyperLink.hpp"
|
||||
#include "slic3r/Utils/CalibUtils.hpp"
|
||||
#include <wx/anybutton.h>
|
||||
#include <wx/colour.h>
|
||||
@@ -194,7 +193,7 @@ protected:
|
||||
|
||||
wxPanel * m_panel_kn;
|
||||
wxStaticText* m_ratio_text;
|
||||
HyperLink * m_wiki_ctrl;
|
||||
Button * m_wiki_ctrl;
|
||||
wxStaticText* m_k_param;
|
||||
TextInput* m_input_k_val;
|
||||
wxStaticText* m_n_param;
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include "slic3r/GUI/PresetComboBoxes.hpp"
|
||||
#include "slic3r/GUI/wxExtensions.hpp"
|
||||
#include <wx/anybutton.h>
|
||||
#include "slic3r/GUI/Widgets/HyperLink.hpp"
|
||||
#include <wx/utils.h>
|
||||
#include <wx/arrstr.h>
|
||||
#include "slic3r/GUI/Widgets/PopupWindow.hpp"
|
||||
@@ -494,7 +493,10 @@ void CaliPageCaption::init_bitmaps() {
|
||||
void CaliPageCaption::create_wiki(wxWindow* parent)
|
||||
{
|
||||
// ORCA standardized HyperLink
|
||||
m_wiki_text = new HyperLink(parent, _L("Wiki Guide"));
|
||||
m_wiki_text = new Button(parent, "", "toolbar_wiki", 0, 15);
|
||||
m_wiki_text->SetToolTip(_L("Wiki Guide"));
|
||||
m_wiki_text->SetStyle(ButtonStyle::Confirm, ButtonType::Circle);
|
||||
m_wiki_text->SetCanFocus(false);
|
||||
m_wiki_text->Bind(wxEVT_LEFT_UP, [this](wxMouseEvent& e) {
|
||||
if (!m_wiki_url.empty())
|
||||
wxLaunchDefaultBrowser(m_wiki_url);
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
#include "Widgets/TextInput.hpp"
|
||||
#include "Widgets/AMSControl.hpp"
|
||||
#include "Widgets/ProgressBar.hpp"
|
||||
#include "Widgets/HyperLink.hpp"
|
||||
#include "wxExtensions.hpp"
|
||||
#include "PresetComboBoxes.hpp"
|
||||
|
||||
@@ -155,7 +154,7 @@ private:
|
||||
void init_bitmaps();
|
||||
void create_wiki(wxWindow* parent);
|
||||
|
||||
HyperLink* m_wiki_text; // ORCA
|
||||
Button* m_wiki_text; // ORCA
|
||||
wxString m_wiki_url;
|
||||
ScalableBitmap m_prev_bmp_normal;
|
||||
ScalableBitmap m_prev_bmp_hover;
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#include "wx/dcgraph.h"
|
||||
#include "I18N.hpp"
|
||||
#include "PartPlate.hpp"
|
||||
#include "Widgets/HyperLink.hpp"
|
||||
#include <wx/colour.h>
|
||||
#include "libslic3r/Config.hpp"
|
||||
#include "libslic3r/PrintConfig.hpp"
|
||||
@@ -27,6 +26,7 @@
|
||||
#include "slic3r/GUI/Widgets/StaticBox.hpp"
|
||||
#include <utility>
|
||||
#include "slic3r/GUI/Widgets/SwitchButton.hpp"
|
||||
#include "slic3r/GUI/Widgets/Button.hpp"
|
||||
#include <wx/tglbtn.h>
|
||||
|
||||
namespace Slic3r { namespace GUI {
|
||||
@@ -203,18 +203,24 @@ FilamentGroupPopup::FilamentGroupPopup(wxWindow *parent) : PopupWindow(parent, w
|
||||
{
|
||||
wxBoxSizer *button_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
// ORCA Unified hyperlinks
|
||||
video_link = new HyperLink(this, _L("Video tutorial"));
|
||||
video_link->Bind(wxEVT_LEFT_DOWN, [](wxMouseEvent& e)
|
||||
{
|
||||
play_dual_extruder_slice_video();
|
||||
wxGetApp().app_config->set("play_slicing_video", "false");
|
||||
});
|
||||
button_sizer->Add(video_link, 0, wxLEFT, horizontal_margin + FromDIP(3));
|
||||
button_sizer->AddStretchSpacer();
|
||||
|
||||
wiki_link = new HyperLink(this, _L("Wiki Guide"));
|
||||
wiki_link->Bind(wxEVT_LEFT_DOWN, [](wxMouseEvent&) { open_filament_group_wiki(); });
|
||||
button_sizer->Add(wiki_link, 0, wxLEFT, horizontal_margin);
|
||||
auto wiki_btn = new Button(this, "", "toolbar_wiki", 0, 15);
|
||||
wiki_btn->SetToolTip(_L("Wiki Guide") + "\n" + "https://e.bambulab.com/t?c=mOkvsXkJ9pldGYp9");
|
||||
wiki_btn->SetStyle(ButtonStyle::Confirm, ::ButtonType::Circle);
|
||||
wiki_btn->SetCanFocus(false);
|
||||
wiki_btn->Bind(wxEVT_LEFT_DOWN, ([](auto& e) {open_filament_group_wiki();}));
|
||||
|
||||
auto video_btn = new Button(this, "", "toolbar_video_guide", 0, 15);
|
||||
video_btn->SetToolTip(_L("Video Guide"));
|
||||
video_btn->SetStyle(ButtonStyle::Confirm, ::ButtonType::Circle);
|
||||
video_btn->SetCanFocus(false);
|
||||
video_btn->Bind(wxEVT_LEFT_DOWN, ([](auto& e) {
|
||||
play_dual_extruder_slice_video();
|
||||
wxGetApp().app_config->set("play_slicing_video", "false");
|
||||
}));
|
||||
|
||||
button_sizer->Add(wiki_btn , 0, wxLEFT, horizontal_margin + FromDIP(3));
|
||||
button_sizer->Add(video_btn, 0, wxLEFT, FromDIP(10));
|
||||
|
||||
top_sizer->Add(button_sizer, 0, wxEXPAND | wxLEFT | wxRIGHT, horizontal_margin);
|
||||
}
|
||||
|
||||
@@ -80,10 +80,6 @@ private:
|
||||
wxBitmap unchecked_hover_bmp;
|
||||
wxBitmap global_tag_bmp;
|
||||
|
||||
|
||||
wxStaticText *wiki_link;
|
||||
wxStaticText *video_link;
|
||||
|
||||
StaticBox *m_smart_filament_panel{nullptr};
|
||||
wxSizerItem *m_smart_filament_spacer{nullptr};
|
||||
SwitchButton *m_smart_filament_switch{nullptr};
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "slic3r/GUI/ImGuiWrapper.hpp"
|
||||
#include "slic3r/GUI/GLModel.hpp"
|
||||
#include "slic3r/GUI/GLShader.hpp"
|
||||
#include "slic3r/GUI/Gizmos/GLGizmoUtils.hpp"
|
||||
#include "libslic3r/Point.hpp"
|
||||
#include <math.h>
|
||||
#include "libvgcode/include/Viewer.hpp"
|
||||
@@ -3127,27 +3128,6 @@ 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); // ORCA match color
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, HyperColor.Value);
|
||||
imgui.text(label.c_str());
|
||||
ImGui::PopStyleColor();
|
||||
|
||||
// ORCA use underline to match hyperlink style
|
||||
ImVec2 lineEnd = ImGui::GetItemRectMax();
|
||||
lineEnd.y -= 2.0f;
|
||||
ImVec2 lineStart = lineEnd;
|
||||
lineStart.x = ImGui::GetItemRectMin().x;
|
||||
ImGui::GetWindowDrawList()->AddLine(lineStart, lineEnd, HyperColor);
|
||||
// click behavior
|
||||
if (ImGui::IsMouseHoveringRect(ImGui::GetItemRectMin(), ImGui::GetItemRectMax(), true)) {
|
||||
if (ImGui::IsMouseClicked(ImGuiMouseButton_Left)) {
|
||||
open_filament_group_wiki();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
auto draw_dash_line = [&](ImDrawList* draw_list, int dash_length = 5, int gap_length = 3) {
|
||||
ImVec2 p1 = ImGui::GetCursorScreenPos();
|
||||
ImVec2 p2 = ImVec2(p1.x + ImGui::GetContentRegionAvail().x, p1.y);
|
||||
@@ -3221,7 +3201,7 @@ void GCodeViewer::render_legend_color_arr_recommen(float window_padding)
|
||||
else
|
||||
tips_count = 5;
|
||||
|
||||
float AMS_container_height = ams_item_height + line_height * tips_count + line_height;
|
||||
float AMS_container_height = ams_item_height + line_height * tips_count + line_height + window_padding * 2.f;
|
||||
ImGui::PushStyleColor(ImGuiCol_ChildBg, ImVec4(0, 0, 0, 0)); // this shold be 0 since its child of gcodeviewer
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1, 1, 1, 1));
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(window_padding * 3, 0));
|
||||
@@ -3236,10 +3216,6 @@ void GCodeViewer::render_legend_color_arr_recommen(float window_padding)
|
||||
ImGui::Dummy({window_padding, window_padding});
|
||||
ImGui::PushStyleColor(ImGuiCol_Separator, ImVec4(1.0f,1.0f,1.0f,0.6f));
|
||||
imgui.bold_text(_u8L("Filament Grouping"));
|
||||
ImGui::SameLine();
|
||||
std::string tip_str = _u8L("Why this grouping");
|
||||
ImGui::SetCursorPosX(ImGui::GetWindowContentRegionWidth() - window_padding - ImGui::CalcTextSize(tip_str.c_str()).x);
|
||||
link_filament_group_wiki(tip_str);
|
||||
ImGui::Separator();
|
||||
ImGui::PopStyleColor();
|
||||
ImGui::Dummy({window_padding, window_padding});
|
||||
@@ -3344,6 +3320,9 @@ void GCodeViewer::render_legend_color_arr_recommen(float window_padding)
|
||||
}
|
||||
|
||||
ImGui::Dummy({window_padding, window_padding});
|
||||
GLGizmoUtils::render_wiki_guide_button(*wxGetApp().plater()->get_current_canvas3D(), m_scale,"https://e.bambulab.com/t?c=mOkvsXkJ9pldGYp9");
|
||||
ImGui::SameLine();
|
||||
|
||||
if (!is_optimal_group) {
|
||||
link_text_set_to_optional(_u8L("Set to Optimal"));
|
||||
ImGui::SameLine();
|
||||
@@ -3352,10 +3331,7 @@ void GCodeViewer::render_legend_color_arr_recommen(float window_padding)
|
||||
}
|
||||
link_text(_u8L("Regroup filament"));
|
||||
|
||||
ImGui::SameLine();
|
||||
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::Dummy({window_padding, window_padding});
|
||||
|
||||
ImGui::EndChild();
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "slic3r/GUI/MsgDialog.hpp"
|
||||
#include "slic3r/GUI/OpenGLManager.hpp"
|
||||
#include "slic3r/GUI/Plater.hpp"
|
||||
#include "slic3r/GUI/Shortcuts.hpp"
|
||||
#include "slic3r/GUI/TextureLibrary.hpp"
|
||||
#include "slic3r/GUI/TextureProjectorFrame.hpp"
|
||||
#include "slic3r/GUI/UVEditorCanvas.hpp"
|
||||
@@ -407,11 +408,48 @@ GLGizmoTextureDisplacement::GLGizmoTextureDisplacement(GLCanvas3D& parent, const
|
||||
|
||||
bool GLGizmoTextureDisplacement::on_init()
|
||||
{
|
||||
m_shortcut = Shortcut::GizmoDisplacement;
|
||||
const wxString ctrl = GUI::shortkey_ctrl_prefix();
|
||||
const wxString alt = GUI::shortkey_alt_prefix();
|
||||
const wxString shift = GUI::shortkey_shift_prefix();
|
||||
|
||||
|
||||
m_desc["cursor_size"] = _L("Brush size");
|
||||
m_desc["circle"] = _L("Circle");
|
||||
m_desc["sphere"] = _L("Sphere");
|
||||
m_desc["remove_layer"] = _L("Remove");
|
||||
m_desc["bake"] = _L_CONTEXT("Bake", "Texture Displacement");
|
||||
|
||||
|
||||
m_desc["paint"] = _L("Paint");
|
||||
m_desc["erase"] = _L("Erase");
|
||||
m_desc["gap_area"] = _L("Gap area");
|
||||
m_desc["smart_fill_angle"] = _L("Smart fill angle");
|
||||
m_desc["toggle_wireframe"] = _L("Toggle Wireframe");
|
||||
|
||||
std::pair<wxString, wxString> paint_shortcut = {_L("Left mouse button"), m_desc["paint"]};
|
||||
std::pair<wxString, wxString> erase_shortcut = {shift + _L("Left mouse button"), m_desc["erase"]};
|
||||
std::pair<wxString, wxString> toggle_wireframe_shortcut = {alt + shift + _L_CONTEXT("Enter", "Keyboard Shortcut"), m_desc["toggle_wireframe"]};
|
||||
|
||||
m_shortcuts_brush = {
|
||||
paint_shortcut,
|
||||
erase_shortcut,
|
||||
{ctrl + _L("Mouse wheel"), m_desc["cursor_size"]},
|
||||
toggle_wireframe_shortcut
|
||||
};
|
||||
|
||||
m_shortcuts_bucket_fill = {
|
||||
paint_shortcut,
|
||||
erase_shortcut,
|
||||
{ctrl + _L("Mouse wheel"), m_desc["smart_fill_angle"]},
|
||||
toggle_wireframe_shortcut
|
||||
};
|
||||
|
||||
m_shortcuts_gap_fill = {
|
||||
{ctrl + _L("Mouse wheel"), m_desc["gap_area"]},
|
||||
toggle_wireframe_shortcut
|
||||
};
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -5313,6 +5351,12 @@ void GLGizmoTextureDisplacement::on_render_input_window(float x, float y, float
|
||||
return;
|
||||
ModelVolume *mv = texture_volume();
|
||||
|
||||
float scale = m_parent.get_scale();
|
||||
#ifdef WIN32
|
||||
int dpi = get_dpi_for_window(wxGetApp().GetTopWindow());
|
||||
scale *= (float) dpi / (float) DPI_DEFAULT;
|
||||
#endif // WIN32
|
||||
|
||||
const float approx_height = m_imgui->scaled(24.f);
|
||||
y = std::min(y, bottom_limit - approx_height);
|
||||
|
||||
@@ -6891,18 +6935,34 @@ void GLGizmoTextureDisplacement::on_render_input_window(float x, float y, float
|
||||
}
|
||||
|
||||
const float button_h = std::round(frame_h * 1.25f);
|
||||
const float third = std::floor((panel_w - style.ItemSpacing.x) / 3.f);
|
||||
if (busy) {
|
||||
if (ImGui::Button((_u8L("Stop") + "##stop").c_str(), ImVec2(third, button_h)))
|
||||
wxGetApp().plater()->get_ui_job_worker().cancel_all();
|
||||
hover_tip(_u8L("Stops the bake. Whatever it had already finished stays on the model, and can be undone."));
|
||||
} else {
|
||||
if (ImGui::Button((_u8L("Close") + "##close").c_str(), ImVec2(third, button_h)))
|
||||
m_parent.reset_all_gizmos();
|
||||
hover_tip(_u8L("Closes the tool without baking. Your paint, layers and settings stay with the model."));
|
||||
}
|
||||
const float button_w = std::max({
|
||||
ImGui::CalcTextSize(_u8L("Close").c_str()).x,
|
||||
ImGui::CalcTextSize(_u8L("Stop").c_str()).x,
|
||||
ImGui::CalcTextSize(_u8L("Preparing...").c_str()).x,
|
||||
ImGui::CalcTextSize(_u8L("Baking...").c_str()).x,
|
||||
}) + m_imgui->scaled(0.5f);
|
||||
const float row_y = ImGui::GetCursorPosY();
|
||||
const float icon_h = 21.f * scale;
|
||||
const float row_h = std::max(icon_h, button_h);
|
||||
|
||||
const std::vector<std::pair<wxString, wxString>> shortcut =
|
||||
m_tool_type == ToolType::BUCKET_FILL ? m_shortcuts_bucket_fill
|
||||
: m_tool_type == ToolType::SMART_FILL ? m_shortcuts_bucket_fill
|
||||
: m_tool_type == ToolType::BRUSH ? m_shortcuts_brush
|
||||
: m_tool_type == ToolType::GAP_FILL ? m_shortcuts_gap_fill
|
||||
: std::vector<std::pair<wxString, wxString>>{};
|
||||
|
||||
ImGui::SetCursorPosY(row_y + (row_h - icon_h) * .5f); // center vertically
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(int(m_imgui->scaled(.5f)), style.ItemSpacing.y));
|
||||
GLGizmoUtils::render_tooltip_button(m_imgui, m_parent, shortcut, x, y);
|
||||
ImGui::SameLine();
|
||||
GLGizmoUtils::render_wiki_guide_button(m_parent, scale, "https://www.orcaslicer.com/wiki/print_prepare/prepare_texture_displacement");
|
||||
ImGui::SameLine();
|
||||
GLGizmoUtils::render_video_guide_button(m_parent, scale, "https://www.youtube.com/watch?v=D7w3tG1kdvE");
|
||||
ImGui::PopStyleVar(1);
|
||||
|
||||
ImGui::SameLine(x0 + panel_w - button_w * 2 - style.ItemSpacing.x);
|
||||
|
||||
const bool can_bake = !busy && mv != nullptr && mv->is_texture_displacement_painted();
|
||||
const std::string bake_label = m_prepare_in_progress ? _u8L("Preparing...") :
|
||||
m_bake_in_progress ? _u8L("Baking...") :
|
||||
@@ -6910,7 +6970,8 @@ void GLGizmoTextureDisplacement::on_render_input_window(float x, float y, float
|
||||
GLGizmoUtils::push_orca_button_style();
|
||||
m_imgui->push_bold_font();
|
||||
m_imgui->disabled_begin(!can_bake);
|
||||
if (ImGui::Button((bake_label + "##bake").c_str(), ImVec2(x0 + panel_w - ImGui::GetCursorPosX(), button_h))) {
|
||||
ImGui::SetCursorPosY(row_y + (row_h - button_h) * .5f); // center vertically
|
||||
if (ImGui::Button((bake_label + "##bake").c_str(), ImVec2(button_w, button_h))) {
|
||||
// Standard mode's Bake is the whole pipeline (remesh -> refine -> displace); Pro's is only the
|
||||
// displacement, because there the user has already prepared the mesh with the controls above.
|
||||
if (pro_mode())
|
||||
@@ -6935,6 +6996,17 @@ void GLGizmoTextureDisplacement::on_render_input_window(float x, float y, float
|
||||
"land on - all in one step."),
|
||||
wrap_w);
|
||||
|
||||
ImGui::SameLine();
|
||||
if (busy) {
|
||||
if (ImGui::Button((_u8L("Stop") + "##stop").c_str(), ImVec2(button_w, button_h)))
|
||||
wxGetApp().plater()->get_ui_job_worker().cancel_all();
|
||||
hover_tip(_u8L("Stops the bake. Whatever it had already finished stays on the model, and can be undone."));
|
||||
} else {
|
||||
if (ImGui::Button((_u8L("Close") + "##close").c_str(), ImVec2(button_w, button_h)))
|
||||
m_parent.reset_all_gizmos();
|
||||
hover_tip(_u8L("Closes the tool without baking. Your paint, layers and settings stay with the model."));
|
||||
}
|
||||
|
||||
// What Bake will produce, and which layers it will skip.
|
||||
if (mv != nullptr) {
|
||||
const std::string base_count = base_k > 0 ? Slic3r::format(_u8L("%1% k"), base_k) :
|
||||
|
||||
@@ -943,6 +943,13 @@ private:
|
||||
|
||||
std::map<std::string, wxString> m_desc;
|
||||
|
||||
// Contains all shortcuts in the format of {shortcut, description}, e.g. {alt + _L("Left mouse button"), _L("Part_selection")}
|
||||
std::vector<std::pair<wxString, wxString>> m_shortcuts_brush;
|
||||
// Contains all shortcuts in the format of {shortcut, description}, e.g. {alt + _L("Left mouse button"), _L("Part_selection")}
|
||||
std::vector<std::pair<wxString, wxString>> m_shortcuts_bucket_fill;
|
||||
// Contains all shortcuts in the format of {shortcut, description}, e.g. {alt + _L("Left mouse button"), _L("Part_selection")}
|
||||
std::vector<std::pair<wxString, wxString>> m_shortcuts_gap_fill;
|
||||
|
||||
// Icons for the panel's icon buttons (tools, views, mapping, tiling, layer actions). Loaded through IconManager with
|
||||
// the same colour/monochrome variants the main toolbar uses, so an inactive button shows the icon in
|
||||
// the theme's normal (grey) foreground colour and an active one shows it in its original colours -
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "GLGizmosManager.hpp"
|
||||
#include "slic3r/GUI/GUI_App.hpp"
|
||||
#include "slic3r/GUI/GLCanvas3D.hpp"
|
||||
#include "slic3r/GUI/I18N.hpp"
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <imgui.h>
|
||||
@@ -10,6 +11,7 @@
|
||||
#include <string_view>
|
||||
#include <cstddef>
|
||||
#include <wx/app.h>
|
||||
#include <wx/utils.h>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include "slic3r/GUI/GUI_Utils.hpp"
|
||||
|
||||
@@ -55,7 +57,6 @@ namespace Slic3r::GUI::GLGizmoUtils {
|
||||
|
||||
auto& gizmos_manager = canvas.get_gizmos_manager();
|
||||
ImTextureID normal_id = gizmos_manager.get_icon_texture_id(GLGizmosManager::MENU_ICON_NAME::IC_TOOLBAR_TOOLTIP);
|
||||
ImTextureID hover_id = gizmos_manager.get_icon_texture_id(GLGizmosManager::MENU_ICON_NAME::IC_TOOLBAR_TOOLTIP_HOVER);
|
||||
|
||||
float scale = canvas.get_scale();
|
||||
#ifdef WIN32
|
||||
@@ -63,13 +64,7 @@ namespace Slic3r::GUI::GLGizmoUtils {
|
||||
scale *= (float)dpi / (float)DPI_DEFAULT;
|
||||
#endif
|
||||
|
||||
ImVec2 button_size = ImVec2(25 * scale, 25 * scale);
|
||||
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 0.0f);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, { 0, 0 });
|
||||
|
||||
ImGui::ImageButton3(normal_id, hover_id, button_size);
|
||||
|
||||
toolbar_circular_button(normal_id, "##tooltip_btn", scale);
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip2(ImVec2(x, caption_y));
|
||||
for (const auto& item : shortcuts) {
|
||||
@@ -79,7 +74,60 @@ namespace Slic3r::GUI::GLGizmoUtils {
|
||||
}
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
ImGui::PopStyleVar(2);
|
||||
}
|
||||
|
||||
bool render_wiki_guide_button(const GLCanvas3D& canvas, float scale, const char* url)
|
||||
{
|
||||
auto& gm = canvas.get_gizmos_manager();
|
||||
auto icon = gm.get_icon_texture_id(GLGizmosManager::MENU_ICON_NAME::IC_TOOLBAR_WIKI_GUIDE);
|
||||
bool clicked = toolbar_circular_button(icon, "##wiki_guide_btn", scale);
|
||||
if (url && *url && clicked)
|
||||
wxLaunchDefaultBrowser(wxString::FromUTF8(url));
|
||||
if (ImGui::IsItemHovered()){
|
||||
if(url && *url)
|
||||
ImGui::SetTooltip("%s\n%s", _u8L("Wiki Guide").c_str(), url);
|
||||
else
|
||||
ImGui::SetTooltip("%s", _u8L("Wiki Guide").c_str());
|
||||
}
|
||||
return clicked; // for dynamically generated links
|
||||
}
|
||||
|
||||
bool render_video_guide_button(const GLCanvas3D& canvas, float scale, const char* url)
|
||||
{
|
||||
auto& gm = canvas.get_gizmos_manager();
|
||||
auto icon = gm.get_icon_texture_id(GLGizmosManager::MENU_ICON_NAME::IC_TOOLBAR_VIDEO_GUIDE);
|
||||
bool clicked = toolbar_circular_button(icon, "##video_guide_btn", scale);
|
||||
if (url && *url && clicked)
|
||||
wxLaunchDefaultBrowser(wxString::FromUTF8(url));
|
||||
if (ImGui::IsItemHovered()){
|
||||
if(url && *url)
|
||||
ImGui::SetTooltip("%s\n%s", _u8L("Video Guide").c_str(), url);
|
||||
else
|
||||
ImGui::SetTooltip("%s", _u8L("Video Guide").c_str());
|
||||
}
|
||||
return clicked; // for dynamically generated links
|
||||
}
|
||||
|
||||
bool toolbar_circular_button(ImTextureID textureID, const char* id, float scale)
|
||||
{
|
||||
ImVec2 btn_sz = ImVec2(21 * scale, 21 * scale);
|
||||
ImVec2 icon_sz = ImVec2(15 * scale, 15 * scale);
|
||||
float btn_pad = (btn_sz.x - icon_sz.x) * .5f;
|
||||
|
||||
ImVec2 p = ImGui::GetCursorScreenPos();
|
||||
bool clicked = ImGui::InvisibleButton(id, btn_sz);
|
||||
ImDrawList* dl = ImGui::GetWindowDrawList();
|
||||
bool is_dark = ImGuiWrapper::COL_WINDOW_BG.x != ImGui::GetStyleColorVec4(ImGuiCol_WindowBg).x;
|
||||
ImVec4 col = is_dark ? ImGuiWrapper::COL_ORCA_DARK : ImGuiWrapper::COL_ORCA;
|
||||
ImVec4 col_hvr = is_dark ? ImGuiWrapper::COL_ORCA_HOVER_DARK : ImGuiWrapper::COL_ORCA_HOVER;
|
||||
dl->AddCircleFilled(
|
||||
ImVec2(p.x + btn_sz.x * .5f, p.y + btn_sz.y * .5f),
|
||||
btn_sz.x * .5f,
|
||||
ImGui::ColorConvertFloat4ToU32((ImGui::IsItemActive()||ImGui::IsItemHovered()) ? col_hvr : col)
|
||||
);
|
||||
dl->AddImage(textureID, ImVec2(p.x + btn_pad, p.y + btn_pad), ImVec2(p.x + btn_sz.x - btn_pad, p.y + btn_sz.y - btn_pad));
|
||||
|
||||
return clicked;
|
||||
}
|
||||
|
||||
void begin_right_aligned_buttons(const std::vector<wxString>& labels)
|
||||
|
||||
@@ -19,6 +19,11 @@ namespace GLGizmoUtils {
|
||||
// Renders a tooltip button using the provided shortcuts
|
||||
void render_tooltip_button(
|
||||
ImGuiWrapper* imgui_wrapper, const GLCanvas3D& canvas, const std::vector<std::pair<wxString, wxString>>& shortcuts, float x, float y);
|
||||
|
||||
void render_wiki_buttons(
|
||||
ImGuiWrapper* imgui_wrapper, const GLCanvas3D& canvas, const char* wiki_url, const char* video_url = "");
|
||||
bool render_wiki_guide_button(const GLCanvas3D& canvas, float scale, const char* url = "");
|
||||
bool render_video_guide_button(const GLCanvas3D& canvas, float scale, const char* url = "");
|
||||
|
||||
// Sets up ImGui to render buttons that are right-aligned within the current window, using the provided labels to calculate spacing.
|
||||
void begin_right_aligned_buttons(const std::vector<wxString>& labels);
|
||||
@@ -27,6 +32,8 @@ namespace GLGizmoUtils {
|
||||
|
||||
void pop_orca_button_style();
|
||||
|
||||
bool toolbar_circular_button(ImTextureID textureID, const char* id, float scale);
|
||||
|
||||
} // namespace GLGizmoUtils
|
||||
} // namespace Slic3r::GUI
|
||||
|
||||
|
||||
@@ -308,13 +308,18 @@ bool GLGizmosManager::init_icon_textures()
|
||||
else
|
||||
return false;
|
||||
|
||||
if (IMTexture::load_from_svg_file(Slic3r::resources_dir() + "/images/toolbar_tooltip.svg", 25, 25, texture_id)) // ORCA: Use same resolution with gizmos to prevent blur on icon
|
||||
if (IMTexture::load_from_svg_file(Slic3r::resources_dir() + "/images/toolbar_tooltip.svg", 15, 15, texture_id)) // ORCA: Use same resolution with gizmos to prevent blur on icon
|
||||
icon_list.insert(std::make_pair((int)IC_TOOLBAR_TOOLTIP, texture_id));
|
||||
else
|
||||
return false;
|
||||
|
||||
if (IMTexture::load_from_svg_file(Slic3r::resources_dir() + "/images/toolbar_tooltip_hover.svg", 25, 25, texture_id)) // ORCA: Use same resolution with gizmos to prevent blur on icon
|
||||
icon_list.insert(std::make_pair((int)IC_TOOLBAR_TOOLTIP_HOVER, texture_id));
|
||||
if (IMTexture::load_from_svg_file(Slic3r::resources_dir() + "/images/toolbar_wiki.svg", 15, 15, texture_id))
|
||||
icon_list.insert(std::make_pair((int)IC_TOOLBAR_WIKI_GUIDE, texture_id));
|
||||
else
|
||||
return false;
|
||||
|
||||
if (IMTexture::load_from_svg_file(Slic3r::resources_dir() + "/images/toolbar_video_guide.svg", 15, 15, texture_id))
|
||||
icon_list.insert(std::make_pair((int)IC_TOOLBAR_VIDEO_GUIDE, texture_id));
|
||||
else
|
||||
return false;
|
||||
|
||||
|
||||
@@ -182,7 +182,8 @@ public:
|
||||
IC_TOOLBAR_RESET_ZERO,
|
||||
IC_TOOLBAR_RESET_ZERO_HOVER,
|
||||
IC_TOOLBAR_TOOLTIP,
|
||||
IC_TOOLBAR_TOOLTIP_HOVER,
|
||||
IC_TOOLBAR_WIKI_GUIDE,
|
||||
IC_TOOLBAR_VIDEO_GUIDE,
|
||||
IC_NAME_COUNT,
|
||||
IC_CANVAS_MENU,
|
||||
IC_CANVAS_MENU_HOVER,
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include "slic3r/GUI/DeviceCore/DevConfigUtil.h"
|
||||
#include "slic3r/GUI/DeviceManager.hpp"
|
||||
#include <wx/sizer.h>
|
||||
#include "slic3r/GUI/Widgets/HyperLink.hpp"
|
||||
#include "slic3r/GUI/Widgets/Button.hpp"
|
||||
#include "libslic3r/CommonDefs.hpp"
|
||||
#include "slic3r/GUI/DeviceCore/DevDefs.h"
|
||||
@@ -1545,12 +1544,14 @@ PrinterPartsDialog::PrinterPartsDialog(wxWindow* parent)
|
||||
change_nozzle_tips->SetFont(Label::Body_13);
|
||||
change_nozzle_tips->SetForegroundColour(STATIC_TEXT_CAPTION_COL);
|
||||
|
||||
m_wiki_link = new HyperLink(single_panel, _L("Wiki Guide")); // ORCA
|
||||
m_wiki_link->SetFont(Label::Body_13);
|
||||
m_wiki_link = new Button(single_panel, "", "toolbar_wiki", 0, 15);
|
||||
m_wiki_link->SetToolTip(_L("Wiki Guide"));
|
||||
m_wiki_link->SetStyle(ButtonStyle::Confirm, ButtonType::Circle);
|
||||
m_wiki_link->SetCanFocus(false);
|
||||
m_wiki_link->Bind(wxEVT_LEFT_DOWN, &PrinterPartsDialog::OnWikiClicked, this);
|
||||
|
||||
h_tips_sizer->Add(change_nozzle_tips, 0, wxLEFT);
|
||||
h_tips_sizer->Add(m_wiki_link, 0, wxLEFT, FromDIP(5));
|
||||
h_tips_sizer->Add(m_wiki_link);
|
||||
h_tips_sizer->Add(change_nozzle_tips, 0, wxLEFT | wxALIGN_CENTER_VERTICAL, FromDIP(5));
|
||||
|
||||
wxSizer* single_update_nozzle_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
m_single_update_nozzle_button = new Button(single_panel, _L("Refresh"));
|
||||
@@ -1656,13 +1657,15 @@ PrinterPartsDialog::PrinterPartsDialog(wxWindow* parent)
|
||||
multiple_change_nozzle_tips->SetFont(Label::Body_13);
|
||||
multiple_change_nozzle_tips->SetForegroundColour(STATIC_TEXT_CAPTION_COL);
|
||||
|
||||
multiple_wiki_link = new HyperLink(multiple_panel, _L("Wiki Guide")); // ORCA
|
||||
multiple_wiki_link->SetFont(Label::Body_13);
|
||||
multiple_wiki_link = new Button(multiple_panel, "", "toolbar_wiki", 0, 15);
|
||||
multiple_wiki_link->SetToolTip(_L("Wiki Guide"));
|
||||
multiple_wiki_link->SetStyle(ButtonStyle::Confirm, ButtonType::Circle);
|
||||
multiple_wiki_link->SetCanFocus(false);
|
||||
multiple_wiki_link->Bind(wxEVT_LEFT_DOWN, &PrinterPartsDialog::OnWikiClicked, this);
|
||||
|
||||
wxSizer* multiple_change_tips_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
multiple_change_tips_sizer->Add(multiple_change_nozzle_tips, 0, wxLEFT);
|
||||
multiple_change_tips_sizer->Add(multiple_wiki_link, 0, wxLEFT, FromDIP(5));
|
||||
multiple_change_tips_sizer->Add(multiple_wiki_link);
|
||||
multiple_change_tips_sizer->Add(multiple_change_nozzle_tips, 0, wxLEFT | wxALIGN_CENTER_VERTICAL, FromDIP(5));
|
||||
|
||||
wxSizer* multiple_update_nozzle_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
m_multiple_update_nozzle_button = new Button(multiple_panel, _L("Refresh"));
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
#include "Widgets/CheckBox.hpp"
|
||||
#include "Widgets/StaticLine.hpp"
|
||||
#include "Widgets/ComboBox.hpp"
|
||||
#include "Widgets/HyperLink.hpp"
|
||||
|
||||
// Previous definitions
|
||||
class Button;
|
||||
class SwitchBoard;
|
||||
class MultiSwitchButton;
|
||||
|
||||
@@ -41,7 +41,7 @@ protected:
|
||||
Label* nozzle_flow_type_label;
|
||||
ComboBox* nozzle_flow_type_checkbox;
|
||||
Label *change_nozzle_tips;
|
||||
HyperLink* m_wiki_link;
|
||||
Button* m_wiki_link;
|
||||
Button* m_single_update_nozzle_button;
|
||||
Button* m_multiple_update_nozzle_button;
|
||||
|
||||
@@ -54,7 +54,7 @@ protected:
|
||||
ComboBox *multiple_right_nozzle_flow_checkbox;
|
||||
|
||||
Label *multiple_change_nozzle_tips;
|
||||
HyperLink* multiple_wiki_link;
|
||||
Button* multiple_wiki_link;
|
||||
|
||||
wxPanel *single_panel;
|
||||
wxPanel *multiple_panel;
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
#include "ConfigValueFormatter.hpp"
|
||||
#include "FilamentBitmapUtils.hpp"
|
||||
#include "Widgets/Label.hpp"
|
||||
#include "Widgets/Button.hpp"
|
||||
#include "Widgets/CheckBox.hpp"
|
||||
#include "Widgets/HyperLink.hpp"
|
||||
#include "Widgets/TextInput.hpp"
|
||||
#include "Widgets/DialogButtons.hpp"
|
||||
#include "Widgets/StaticLine.hpp"
|
||||
@@ -756,11 +756,24 @@ PublishSettingsDialog::PublishSettingsDialog(wxWindow* parent,
|
||||
dlg_btns->GetCANCEL()->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) { EndModal(wxID_CANCEL); });
|
||||
|
||||
// Guide links, bottom-left, sharing the footer row with the OK/Cancel buttons (pushed right).
|
||||
wxBoxSizer* links_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
auto* wiki_link = new HyperLink(this, _L("Wiki Guide"), "https://www.orcaslicer.com/wiki/publishing_3mf/publish_3mf.html");
|
||||
auto* video_link = new HyperLink(this, _L("Video Guide"), "https://www.youtube.com/watch?v=-xt1N29UIOg");
|
||||
links_sizer->Add(wiki_link , 0, wxALIGN_LEFT);
|
||||
links_sizer->Add(video_link, 0, wxTOP | wxALIGN_LEFT, FromDIP(4));
|
||||
wxBoxSizer* links_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
|
||||
auto wiki_btn = new Button(this, "", "toolbar_wiki", 0, 15);
|
||||
auto wiki_url = "https://www.orcaslicer.com/wiki/publishing_3mf/publish_3mf";
|
||||
wiki_btn->SetToolTip(_L("Wiki Guide") + "\n" + wiki_url);
|
||||
wiki_btn->SetStyle(ButtonStyle::Confirm, ButtonType::Circle);
|
||||
wiki_btn->SetCanFocus(false);
|
||||
wiki_btn->Bind(wxEVT_LEFT_DOWN, ([wiki_url](auto& e) {wxLaunchDefaultBrowser(wiki_url);}));
|
||||
|
||||
auto video_btn = new Button(this, "", "toolbar_video_guide", 0, 15);
|
||||
auto video_url = "https://www.youtube.com/watch?v=-xt1N29UIOg";
|
||||
video_btn->SetToolTip(_L("Video Guide") + "\n" + video_url);
|
||||
video_btn->SetStyle(ButtonStyle::Confirm, ButtonType::Circle);
|
||||
video_btn->SetCanFocus(false);
|
||||
video_btn->Bind(wxEVT_LEFT_DOWN, ([video_url](auto& e) {wxLaunchDefaultBrowser(video_url);}));
|
||||
|
||||
links_sizer->Add(wiki_btn , 0, wxLEFT, FromDIP(10));
|
||||
links_sizer->Add(video_btn, 0, wxLEFT, FromDIP(10));
|
||||
|
||||
wxBoxSizer* footer = new wxBoxSizer(wxHORIZONTAL);
|
||||
footer->Add(links_sizer, 0, wxALIGN_CENTER_VERTICAL);
|
||||
@@ -771,7 +784,7 @@ PublishSettingsDialog::PublishSettingsDialog(wxWindow* parent,
|
||||
footer_line->SetMinSize(wxSize(-1, 1));
|
||||
footer_line->SetMaxSize(wxSize(-1, 1));
|
||||
w_sizer->Add(footer_line, 0, wxRIGHT | wxLEFT | wxTOP | wxEXPAND, FromDIP(10));
|
||||
w_sizer->Add(footer, 0, wxRIGHT | wxLEFT | wxTOP | wxBOTTOM | wxEXPAND, FromDIP(10));
|
||||
w_sizer->Add(footer, 0, wxEXPAND, FromDIP(10));
|
||||
|
||||
SetSizerAndFit(w_sizer);
|
||||
fit_to_content(); // initial size only; the dialog is resizable
|
||||
|
||||
@@ -113,6 +113,7 @@ constexpr std::array<ShortcutInfo, size_t(Shortcut::Count)> shortcut_table = {{
|
||||
SHORTCUT(GizmoMeasure, "gizmo_measure", L("Gizmo measure"), PLATER, { 'U' }),
|
||||
SHORTCUT(GizmoAssembly, "gizmo_assembly", L("Gizmo assemble"), PLATER, { 'Y' }),
|
||||
SHORTCUT(GizmoBrimEars, "gizmo_brim_ears", L("Gizmo brim ears"), PLATER, { 'E' }),
|
||||
SHORTCUT(GizmoDisplacement, "gizmo_displacement", L("Gizmo texture displacement painting"), PLATER, { 'D' }),
|
||||
|
||||
// Sliders
|
||||
SHORTCUT(GoToLayer, "go_to_layer", L("Jump to layer"), PREVIEW, { 'G', SHIFT }),
|
||||
|
||||
@@ -38,7 +38,7 @@ enum class Shortcut : uint8_t {
|
||||
MoveSelectionLeft, MoveSelectionRight, MoveSelectionUp, MoveSelectionDown, RotateSelectionLeft, RotateSelectionRight,
|
||||
// Gizmos
|
||||
GizmoMove, GizmoRotate, GizmoScale, GizmoFlatten, GizmoCut, GizmoMeshBoolean, GizmoFdmSupports, GizmoSeam, GizmoFuzzySkin,
|
||||
GizmoMmuSegmentation, GizmoEmboss, GizmoMeasure, GizmoAssembly, GizmoBrimEars,
|
||||
GizmoMmuSegmentation, GizmoEmboss, GizmoMeasure, GizmoAssembly, GizmoBrimEars, GizmoDisplacement,
|
||||
// Sliders
|
||||
GoToLayer, LayerSliderUp, LayerSliderDown, MovesSliderLeft, MovesSliderRight, MovesSliderStart, MovesSliderEnd,
|
||||
// Painting tools
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#include "slic3r/GUI/GUI_Utils.hpp"
|
||||
#include "slic3r/GUI/Widgets/StateColor.hpp"
|
||||
#include "slic3r/GUI/Widgets/Label.hpp"
|
||||
#include "slic3r/GUI/Widgets/HyperLink.hpp"
|
||||
#include "slic3r/GUI/MsgDialog.hpp"
|
||||
#include "libslic3r/LocalesUtils.hpp"
|
||||
#include "libslic3r/Thread.hpp"
|
||||
@@ -26,6 +25,7 @@
|
||||
#include <chrono>
|
||||
#include <wx/string.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/utils.h>
|
||||
#include <wx/valtext.h>
|
||||
|
||||
using namespace Slic3r;
|
||||
@@ -131,19 +131,14 @@ StepMeshDialog::StepMeshDialog(wxWindow* parent, Slic3r::Step& file, double line
|
||||
|
||||
auto tip_frame = new RoundedRectangle(this, StateColor::darkModeColorFor(wxColour("#F1F1F1")), wxDefaultPosition, wxSize(-1,-1), 6, 0);
|
||||
|
||||
wxBoxSizer* tips_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
wxBoxSizer* tips_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
wxStaticText* info = new wxStaticText(tip_frame, wxID_ANY, _L("Smaller linear and angular deflections result in higher-quality transformations but increase the processing time."));
|
||||
info->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#363636")));
|
||||
info->SetBackgroundColour(StateColor::darkModeColorFor(wxColour("#F1F1F1")));
|
||||
info->SetFont(::Label::Body_14);
|
||||
info->Wrap(FromDIP(450));
|
||||
|
||||
// ORCA standardized HyperLink
|
||||
HyperLink *tips = new HyperLink(tip_frame, _L("Wiki Guide"), "https://www.orcaslicer.com/wiki/import_export#step");
|
||||
tips->SetBackgroundColour(StateColor::darkModeColorFor(wxColour("#F1F1F1")));
|
||||
|
||||
tips_sizer->Add(info, 0, wxEXPAND | wxLEFT | wxRIGHT | wxTOP, FromDIP(10));
|
||||
tips_sizer->Add(tips, 0, wxALL, FromDIP(10));
|
||||
tips_sizer->Add(info, 0, wxEXPAND |wxALL , FromDIP(10));
|
||||
|
||||
tip_frame->SetSizer(tips_sizer);
|
||||
tip_frame->Layout();
|
||||
@@ -289,12 +284,24 @@ StepMeshDialog::StepMeshDialog(wxWindow* parent, Slic3r::Step& file, double line
|
||||
save_default_sizer->Add(m_save_default_checkbox, 0, wxALIGN_LEFT);
|
||||
bSizer->Add(save_default_sizer, 0, wxEXPAND | wxLEFT | wxRIGHT, LEFT_RIGHT_PADING);
|
||||
|
||||
wxBoxSizer* bSizer_button = new wxBoxSizer(wxHORIZONTAL);
|
||||
bSizer_button->SetMinSize(wxSize(FromDIP(100), -1));
|
||||
bSizer->AddSpacer(FromDIP(10));
|
||||
|
||||
m_checkbox = new wxCheckBox(this, wxID_ANY, _L("Don't show again"), wxDefaultPosition, wxDefaultSize, 0);
|
||||
m_checkbox->SetFont(::Label::Body_14);
|
||||
m_checkbox->SetForegroundColour(StateColor::darkModeColorFor(FONT_COLOR));
|
||||
bSizer_button->Add(m_checkbox, 0, wxALIGN_LEFT | wxLEFT | wxALIGN_CENTER_VERTICAL, LEFT_RIGHT_PADING);
|
||||
bSizer->Add(m_checkbox, 0, wxLEFT, LEFT_RIGHT_PADING);
|
||||
|
||||
wxBoxSizer* bSizer_button = new wxBoxSizer(wxHORIZONTAL);
|
||||
|
||||
// ORCA standardized HyperLink
|
||||
auto wiki_btn = new Button(this, "", "toolbar_wiki", 0, 15);
|
||||
auto wiki_url = "https://www.orcaslicer.com/wiki/import_export#step";
|
||||
wiki_btn->SetToolTip(_L("Wiki Guide") + "\n" + wiki_url);
|
||||
wiki_btn->SetStyle(ButtonStyle::Confirm, ButtonType::Circle);
|
||||
wiki_btn->SetCanFocus(false);
|
||||
wiki_btn->Bind(wxEVT_LEFT_DOWN, ([wiki_url](auto& e) {wxLaunchDefaultBrowser(wiki_url);}));
|
||||
bSizer_button->Add(wiki_btn, 0, wxALIGN_LEFT | wxLEFT | wxALIGN_CENTER_VERTICAL, LEFT_RIGHT_PADING);
|
||||
|
||||
bSizer_button->AddStretchSpacer(1);
|
||||
|
||||
auto dlg_btns = new DialogButtons(this, {"OK", "Cancel"});
|
||||
|
||||
@@ -236,7 +236,19 @@ TroubleshootDialog::TroubleshootDialog()
|
||||
Fit();
|
||||
});
|
||||
|
||||
auto link_wiki = new HyperLink(this, _L("Wiki Guide"), "https://www.orcaslicer.com/wiki/troubleshoot_center");
|
||||
auto wiki_btn = new Button(this, "", "toolbar_wiki", 0, 15);
|
||||
auto wiki_url = "https://www.orcaslicer.com/wiki/troubleshoot_center";
|
||||
wiki_btn->SetToolTip(_L("Wiki Guide") + "\n" + wiki_url);
|
||||
wiki_btn->SetStyle(ButtonStyle::Confirm, ButtonType::Circle);
|
||||
wiki_btn->SetCanFocus(false);
|
||||
wiki_btn->Bind(wxEVT_LEFT_DOWN, ([wiki_url](auto& e) {wxLaunchDefaultBrowser(wiki_url);}));
|
||||
|
||||
auto video_btn = new Button(this, "", "toolbar_video_guide", 0, 15);
|
||||
auto video_url = "https://www.youtube.com/watch?v=CFzt8W7OCx0";
|
||||
video_btn->SetToolTip(_L("Video Guide") + "\n" + video_url);
|
||||
video_btn->SetStyle(ButtonStyle::Confirm, ButtonType::Circle);
|
||||
video_btn->SetCanFocus(false);
|
||||
video_btn->Bind(wxEVT_LEFT_DOWN, ([video_url](auto& e) {wxLaunchDefaultBrowser(video_url);}));
|
||||
|
||||
// RIGHT SIZER //////////////////////
|
||||
|
||||
@@ -367,6 +379,10 @@ TroubleshootDialog::TroubleshootDialog()
|
||||
sys_btn_sizer->AddStretchSpacer();
|
||||
sys_btn_sizer->Add(sys_copy_btn, 0, wxLEFT | wxRIGHT, FromDIP(5));
|
||||
|
||||
wxBoxSizer *link_btn_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
link_btn_sizer->Add(wiki_btn);
|
||||
link_btn_sizer->Add(video_btn, 0, wxLEFT, FromDIP(10));
|
||||
|
||||
left_sizer->Add(m_header_logo , 0, wxEXPAND | wxALIGN_CENTER);
|
||||
left_sizer->Add(logo_line , 0, wxEXPAND | wxTOP, FromDIP(12));
|
||||
left_sizer->Add(version , 0, wxEXPAND | wxTOP, FromDIP(6));
|
||||
@@ -374,8 +390,7 @@ TroubleshootDialog::TroubleshootDialog()
|
||||
left_sizer->Add(sys_panel , 0, wxEXPAND | wxTOP, FromDIP(15));
|
||||
left_sizer->AddStretchSpacer();
|
||||
left_sizer->Add(sys_btn_sizer , 0, wxEXPAND | wxTOP, FromDIP(15));
|
||||
left_sizer->Add(link_wiki , 0, wxALIGN_CENTER | wxTOP, FromDIP(15));
|
||||
left_sizer->AddSpacer(FromDIP(5));
|
||||
left_sizer->Add(link_btn_sizer , 0, wxALIGN_CENTER | wxTOP, FromDIP(15));
|
||||
|
||||
wxBoxSizer *right_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/tokenzr.h>
|
||||
#include <wx/utils.h>
|
||||
#include <wx/variant.h>
|
||||
#include <wx/window.h>
|
||||
#include <wx/toplevel.h>
|
||||
@@ -62,7 +63,6 @@
|
||||
#include "PresetComboBoxes.hpp"
|
||||
#include "Widgets/CheckBox.hpp"
|
||||
#include "Widgets/DialogButtons.hpp"
|
||||
#include "Widgets/HyperLink.hpp"
|
||||
|
||||
#ifdef __linux__
|
||||
#define wxLinux true
|
||||
@@ -1011,8 +1011,14 @@ void UnsavedChangesDialog::build(Preset::Type type, PresetCollection *dependent_
|
||||
checkbox_sizer->Show(bool(m_buttons & REMEMBER_CHOISE));
|
||||
|
||||
if (dependent_presets != nullptr) {
|
||||
auto wiki = new HyperLink(this, _L("Wiki Guide"), "https://www.orcaslicer.com/wiki/transfer_discard_changes");
|
||||
m_sizer_button->Add(wiki, 0, wxLEFT | wxALIGN_CENTER_VERTICAL, FromDIP(22));
|
||||
auto wiki_btn = new Button(this, "", "toolbar_wiki", 0, 15);
|
||||
auto wiki_url = "https://www.orcaslicer.com/wiki/transfer_discard_changes";
|
||||
wiki_btn->SetToolTip(_L("Wiki Guide") + "\n" + wiki_url);
|
||||
wiki_btn->SetStyle(ButtonStyle::Confirm, ButtonType::Circle);
|
||||
wiki_btn->SetCanFocus(false);
|
||||
wiki_btn->Bind(wxEVT_LEFT_DOWN, ([wiki_url](auto& e) {wxLaunchDefaultBrowser(wiki_url);}));
|
||||
|
||||
m_sizer_button->Add(wiki_btn, 0, wxLEFT | wxALIGN_CENTER_VERTICAL, FromDIP(22));
|
||||
}
|
||||
|
||||
m_sizer_button->Add(0, 0, 1, 0, 0);
|
||||
|
||||
@@ -223,6 +223,12 @@ void Button::SetStyle(const ButtonStyle style, const ButtonType type)
|
||||
this->SetMinSize(FromDIP(wxSize(26, 26)));
|
||||
this->SetSize(FromDIP(wxSize(26, 26)));
|
||||
this->SetCornerRadius(this->FromDIP(4));
|
||||
} else if (type == ButtonType::Circle) {
|
||||
this->SetPaddingSize(FromDIP(wxSize(6, 6)));
|
||||
this->SetMinSize(FromDIP(wxSize(25, 25)));
|
||||
this->SetMaxSize(FromDIP(wxSize(25, 25)));
|
||||
this->SetSize(FromDIP(wxSize(25, 25)));
|
||||
this->SetCornerRadius(this->FromDIP(12));
|
||||
} else if (type == ButtonType::Expanded) {
|
||||
this->SetMinSize(FromDIP(wxSize(-1, 32)));
|
||||
this->SetPaddingSize(FromDIP(wxSize(12, 8)));
|
||||
|
||||
@@ -34,6 +34,7 @@ enum class ButtonType {
|
||||
Parameter, // Font14 Semi-Rounded For buttons that near parameter boxes
|
||||
Icon, // ------ Semi-Rounded For buttons that only has icons. icons should be 16x16 and iconSize has to be defined as 16 while
|
||||
// creation of button
|
||||
Circle, // ------ FullyRounded Same as icon
|
||||
Expanded, // Font14 Semi-Rounded For full length buttons. ex. buttons in static box
|
||||
};
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <cstddef>
|
||||
#include "slic3r/GUI/GUI_Utils.hpp"
|
||||
#include <wx/colour.h>
|
||||
#include "slic3r/GUI/Widgets/Button.hpp"
|
||||
#include "slic3r/GUI/Widgets/Label.hpp"
|
||||
#include "slic3r/GUI/Widgets/LabeledStaticBox.hpp"
|
||||
#include "slic3r/GUI/Widgets/RadioGroup.hpp"
|
||||
@@ -25,7 +26,6 @@
|
||||
#include <wx/dcgraph.h>
|
||||
#include "MainFrame.hpp"
|
||||
#include "Widgets/DialogButtons.hpp"
|
||||
#include "Widgets/HyperLink.hpp"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <cmath>
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <wx/dialog.h>
|
||||
#include <wx/valtext.h>
|
||||
#include <wx/tglbtn.h>
|
||||
#include <wx/utils.h>
|
||||
#include <wx/event.h>
|
||||
#include "libslic3r/PrintConfig.hpp"
|
||||
#include "libslic3r/Flow.hpp"
|
||||
@@ -237,8 +238,15 @@ PA_Calibration_Dlg::PA_Calibration_Dlg(wxWindow* parent, wxWindowID id, Plater*
|
||||
auto dlg_btns = new DialogButtons(this, {"OK"});
|
||||
|
||||
auto bottom_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
auto wiki = new HyperLink(this, _L("Wiki Guide"), "https://www.orcaslicer.com/wiki/pressure_advance_calib");
|
||||
bottom_sizer->Add(wiki, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(20));
|
||||
|
||||
auto wiki_btn = new Button(this, "", "toolbar_wiki", 0, 15);
|
||||
auto wiki_url = "https://www.orcaslicer.com/wiki/pressure_advance_calib";
|
||||
wiki_btn->SetToolTip(_L("Wiki Guide") + "\n" + wiki_url);
|
||||
wiki_btn->SetStyle(ButtonStyle::Confirm, ButtonType::Circle);
|
||||
wiki_btn->SetCanFocus(false);
|
||||
wiki_btn->Bind(wxEVT_LEFT_DOWN, ([wiki_url](auto& e) {wxLaunchDefaultBrowser(wiki_url);}));
|
||||
|
||||
bottom_sizer->Add(wiki_btn, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(10));
|
||||
bottom_sizer->AddStretchSpacer();
|
||||
bottom_sizer->Add(dlg_btns, 0, wxEXPAND);
|
||||
v_sizer->Add(bottom_sizer, 0, wxEXPAND);
|
||||
@@ -459,8 +467,15 @@ Temp_Calibration_Dlg::Temp_Calibration_Dlg(wxWindow* parent, wxWindowID id, Plat
|
||||
auto dlg_btns = new DialogButtons(this, {"OK"});
|
||||
|
||||
auto bottom_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
auto wiki = new HyperLink(this, _L("Wiki Guide"), "https://www.orcaslicer.com/wiki/temp_calib");
|
||||
bottom_sizer->Add(wiki, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(20));
|
||||
|
||||
auto wiki_btn = new Button(this, "", "toolbar_wiki", 0, 15);
|
||||
auto wiki_url = "https://www.orcaslicer.com/wiki/temp_calib";
|
||||
wiki_btn->SetToolTip(_L("Wiki Guide") + "\n" + wiki_url);
|
||||
wiki_btn->SetStyle(ButtonStyle::Confirm, ButtonType::Circle);
|
||||
wiki_btn->SetCanFocus(false);
|
||||
wiki_btn->Bind(wxEVT_LEFT_DOWN, ([wiki_url](auto& e) {wxLaunchDefaultBrowser(wiki_url);}));
|
||||
|
||||
bottom_sizer->Add(wiki_btn, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(10));
|
||||
bottom_sizer->AddStretchSpacer();
|
||||
bottom_sizer->Add(dlg_btns, 0, wxEXPAND);
|
||||
v_sizer->Add(bottom_sizer, 0, wxEXPAND);
|
||||
@@ -642,8 +657,15 @@ MaxVolumetricSpeed_Test_Dlg::MaxVolumetricSpeed_Test_Dlg(wxWindow* parent, wxWin
|
||||
auto dlg_btns = new DialogButtons(this, {"OK"});
|
||||
|
||||
auto bottom_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
auto wiki = new HyperLink(this, _L("Wiki Guide"), "https://www.orcaslicer.com/wiki/volumetric_speed_calib");
|
||||
bottom_sizer->Add(wiki, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(20));
|
||||
|
||||
auto wiki_btn = new Button(this, "", "toolbar_wiki", 0, 15);
|
||||
auto wiki_url = "https://www.orcaslicer.com/wiki/volumetric_speed_calib";
|
||||
wiki_btn->SetToolTip(_L("Wiki Guide") + "\n" + wiki_url);
|
||||
wiki_btn->SetStyle(ButtonStyle::Confirm, ButtonType::Circle);
|
||||
wiki_btn->SetCanFocus(false);
|
||||
wiki_btn->Bind(wxEVT_LEFT_DOWN, ([wiki_url](auto& e) {wxLaunchDefaultBrowser(wiki_url);}));
|
||||
|
||||
bottom_sizer->Add(wiki_btn, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(10));
|
||||
bottom_sizer->AddStretchSpacer();
|
||||
bottom_sizer->Add(dlg_btns, 0, wxEXPAND);
|
||||
v_sizer->Add(bottom_sizer, 0, wxEXPAND);
|
||||
@@ -766,8 +788,15 @@ VFA_Test_Dlg::VFA_Test_Dlg(wxWindow* parent, wxWindowID id, Plater* plater)
|
||||
auto dlg_btns = new DialogButtons(this, {"OK"});
|
||||
|
||||
auto bottom_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
auto wiki = new HyperLink(this, _L("Wiki Guide"), "https://www.orcaslicer.com/wiki/vfa_calib");
|
||||
bottom_sizer->Add(wiki, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(20));
|
||||
|
||||
auto wiki_btn = new Button(this, "", "toolbar_wiki", 0, 15);
|
||||
auto wiki_url = "https://www.orcaslicer.com/wiki/vfa_calib";
|
||||
wiki_btn->SetToolTip(_L("Wiki Guide") + "\n" + wiki_url);
|
||||
wiki_btn->SetStyle(ButtonStyle::Confirm, ButtonType::Circle);
|
||||
wiki_btn->SetCanFocus(false);
|
||||
wiki_btn->Bind(wxEVT_LEFT_DOWN, ([wiki_url](auto& e) {wxLaunchDefaultBrowser(wiki_url);}));
|
||||
|
||||
bottom_sizer->Add(wiki_btn, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(10));
|
||||
bottom_sizer->AddStretchSpacer();
|
||||
bottom_sizer->Add(dlg_btns, 0, wxEXPAND);
|
||||
v_sizer->Add(bottom_sizer, 0, wxEXPAND);
|
||||
@@ -1005,8 +1034,15 @@ Retraction_Test_Dlg::Retraction_Test_Dlg(wxWindow* parent, wxWindowID id, Plater
|
||||
auto dlg_btns = new DialogButtons(this, {"OK"});
|
||||
|
||||
auto bottom_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
auto wiki = new HyperLink(this, _L("Wiki Guide"), "https://www.orcaslicer.com/wiki/retraction_calib");
|
||||
bottom_sizer->Add(wiki, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(20));
|
||||
|
||||
auto wiki_btn = new Button(this, "", "toolbar_wiki", 0, 15);
|
||||
auto wiki_url = "https://www.orcaslicer.com/wiki/retraction_calib";
|
||||
wiki_btn->SetToolTip(_L("Wiki Guide") + "\n" + wiki_url);
|
||||
wiki_btn->SetStyle(ButtonStyle::Confirm, ButtonType::Circle);
|
||||
wiki_btn->SetCanFocus(false);
|
||||
wiki_btn->Bind(wxEVT_LEFT_DOWN, ([wiki_url](auto& e) {wxLaunchDefaultBrowser(wiki_url);}));
|
||||
|
||||
bottom_sizer->Add(wiki_btn, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(10));
|
||||
bottom_sizer->AddStretchSpacer();
|
||||
bottom_sizer->Add(dlg_btns, 0, wxEXPAND);
|
||||
v_sizer->Add(bottom_sizer, 0, wxEXPAND);
|
||||
@@ -1185,8 +1221,15 @@ Input_Shaping_Freq_Test_Dlg::Input_Shaping_Freq_Test_Dlg(wxWindow* parent, wxWin
|
||||
auto dlg_btns = new DialogButtons(this, {"OK"});
|
||||
|
||||
auto bottom_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
auto wiki = new HyperLink(this, _L("Wiki Guide"), "https://www.orcaslicer.com/wiki/input_shaping_calib");
|
||||
bottom_sizer->Add(wiki, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(20));
|
||||
|
||||
auto wiki_btn = new Button(this, "", "toolbar_wiki", 0, 15);
|
||||
auto wiki_url = "https://www.orcaslicer.com/wiki/input_shaping_calib";
|
||||
wiki_btn->SetToolTip(_L("Wiki Guide") + "\n" + wiki_url);
|
||||
wiki_btn->SetStyle(ButtonStyle::Confirm, ButtonType::Circle);
|
||||
wiki_btn->SetCanFocus(false);
|
||||
wiki_btn->Bind(wxEVT_LEFT_DOWN, ([wiki_url](auto& e) {wxLaunchDefaultBrowser(wiki_url);}));
|
||||
|
||||
bottom_sizer->Add(wiki_btn, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(10));
|
||||
bottom_sizer->AddStretchSpacer();
|
||||
bottom_sizer->Add(dlg_btns, 0, wxEXPAND);
|
||||
v_sizer->Add(bottom_sizer, 0, wxEXPAND);
|
||||
@@ -1384,8 +1427,15 @@ Input_Shaping_Damp_Test_Dlg::Input_Shaping_Damp_Test_Dlg(wxWindow* parent, wxWin
|
||||
auto dlg_btns = new DialogButtons(this, {"OK"});
|
||||
|
||||
auto bottom_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
auto wiki = new HyperLink(this, _L("Wiki Guide"), "https://www.orcaslicer.com/wiki/input_shaping_calib");
|
||||
bottom_sizer->Add(wiki, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(20));
|
||||
|
||||
auto wiki_btn = new Button(this, "", "toolbar_wiki", 0, 15);
|
||||
auto wiki_url = "https://www.orcaslicer.com/wiki/input_shaping_calib";
|
||||
wiki_btn->SetToolTip(_L("Wiki Guide") + "\n" + wiki_url);
|
||||
wiki_btn->SetStyle(ButtonStyle::Confirm, ButtonType::Circle);
|
||||
wiki_btn->SetCanFocus(false);
|
||||
wiki_btn->Bind(wxEVT_LEFT_DOWN, ([wiki_url](auto& e) {wxLaunchDefaultBrowser(wiki_url);}));
|
||||
|
||||
bottom_sizer->Add(wiki_btn, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(10));
|
||||
bottom_sizer->AddStretchSpacer();
|
||||
bottom_sizer->Add(dlg_btns, 0, wxEXPAND);
|
||||
v_sizer->Add(bottom_sizer, 0, wxEXPAND);
|
||||
@@ -1580,8 +1630,15 @@ Cornering_Test_Dlg::Cornering_Test_Dlg(wxWindow* parent, wxWindowID id, Plater*
|
||||
auto dlg_btns = new DialogButtons(this, {"OK"});
|
||||
|
||||
auto bottom_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
auto wiki = new HyperLink(this, _L("Wiki Guide"), "https://www.orcaslicer.com/wiki/cornering_calib");
|
||||
bottom_sizer->Add(wiki, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(20));
|
||||
|
||||
auto wiki_btn = new Button(this, "", "toolbar_wiki", 0, 15);
|
||||
auto wiki_url = "https://www.orcaslicer.com/wiki/cornering_calib";
|
||||
wiki_btn->SetToolTip(_L("Wiki Guide") + "\n" + wiki_url);
|
||||
wiki_btn->SetStyle(ButtonStyle::Confirm, ButtonType::Circle);
|
||||
wiki_btn->SetCanFocus(false);
|
||||
wiki_btn->Bind(wxEVT_LEFT_DOWN, ([wiki_url](auto& e) {wxLaunchDefaultBrowser(wiki_url);}));
|
||||
|
||||
bottom_sizer->Add(wiki_btn, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(10));
|
||||
bottom_sizer->AddStretchSpacer();
|
||||
bottom_sizer->Add(dlg_btns, 0, wxEXPAND);
|
||||
v_sizer->Add(bottom_sizer, 0, wxEXPAND);
|
||||
@@ -1719,8 +1776,15 @@ FlowRateCalibrationDialog::FlowRateCalibrationDialog(wxWindow* parent, wxWindowI
|
||||
auto dlg_btns = new DialogButtons(this, {"OK"});
|
||||
|
||||
auto bottom_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
auto wiki = new HyperLink(this, _L("Wiki Guide"), "https://www.orcaslicer.com/wiki/flow_ratio_calib");
|
||||
bottom_sizer->Add(wiki, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(20));
|
||||
|
||||
auto wiki_btn = new Button(this, "", "toolbar_wiki", 0, 15);
|
||||
auto wiki_url = "https://www.orcaslicer.com/wiki/flow_ratio_calib";
|
||||
wiki_btn->SetToolTip(_L("Wiki Guide") + "\n" + wiki_url);
|
||||
wiki_btn->SetStyle(ButtonStyle::Confirm, ButtonType::Circle);
|
||||
wiki_btn->SetCanFocus(false);
|
||||
wiki_btn->Bind(wxEVT_LEFT_DOWN, ([wiki_url](auto& e) {wxLaunchDefaultBrowser(wiki_url);}));
|
||||
|
||||
bottom_sizer->Add(wiki_btn, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(10));
|
||||
bottom_sizer->AddStretchSpacer();
|
||||
bottom_sizer->Add(dlg_btns, 0, wxEXPAND);
|
||||
v_sizer->Add(bottom_sizer, 0, wxEXPAND);
|
||||
|
||||
Reference in New Issue
Block a user