mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-19 06:41:14 -06:00
Merge branch 'main' into enh-port-edit-gcode-dlg
This commit is contained in:
commit
a8148d8ee6
66 changed files with 962 additions and 966 deletions
|
@ -4504,16 +4504,17 @@ void GCodeViewer::render_legend(float &legend_height, int canvas_width, int canv
|
|||
return ret;
|
||||
};
|
||||
|
||||
auto calculate_offsets = [max_width, window_padding](const std::vector<std::pair<std::string, std::vector<::string>>>& title_columns, float extra_size = 0.0f) {
|
||||
auto calculate_offsets = [&imgui, max_width, window_padding](const std::vector<std::pair<std::string, std::vector<::string>>>& title_columns, float extra_size = 0.0f) {
|
||||
const ImGuiStyle& style = ImGui::GetStyle();
|
||||
std::vector<float> offsets;
|
||||
offsets.push_back(max_width(title_columns[0].second, title_columns[0].first, extra_size) + 3.0f * style.ItemSpacing.x);
|
||||
for (size_t i = 1; i < title_columns.size() - 1; i++)
|
||||
offsets.push_back(offsets.back() + max_width(title_columns[i].second, title_columns[i].first) + style.ItemSpacing.x);
|
||||
if (title_columns.back().first == _u8L("Display")) {
|
||||
const auto preferred_offset = ImGui::GetWindowWidth() - ImGui::CalcTextSize(_u8L("Display").c_str()).x - ImGui::GetFrameHeight() / 2 - 2 * window_padding;
|
||||
const auto preferred_offset = ImGui::GetWindowWidth() - ImGui::CalcTextSize(_u8L("Display").c_str()).x - ImGui::GetFrameHeight() / 2 - 2 * window_padding - ImGui::GetStyle().ScrollbarSize;
|
||||
if (preferred_offset > offsets.back()) {
|
||||
offsets.back() = preferred_offset;
|
||||
imgui.set_requires_extra_frame();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -110,7 +110,9 @@ void SelectionInfo::on_update()
|
|||
|
||||
m_model_object = nullptr;
|
||||
|
||||
if (selection.is_single_full_instance()) {
|
||||
// BBS still keep object pointer when selection is volume
|
||||
// if (selection.is_single_full_instance()) {
|
||||
if (!selection.is_empty()) {
|
||||
m_model_object = selection.get_model()->objects[selection.get_object_idx()];
|
||||
m_z_shift = selection.get_first_volume()->get_sla_shift_z();
|
||||
}
|
||||
|
|
|
@ -272,8 +272,8 @@ SideTools::SideTools(wxWindow *parent, wxWindowID id, const wxPoint &pos, const
|
|||
wxBoxSizer* connection_sizer_V = new wxBoxSizer(wxVERTICAL);
|
||||
wxBoxSizer* connection_sizer_H = new wxBoxSizer(wxHORIZONTAL);
|
||||
|
||||
// m_hyperlink = new wxHyperlinkCtrl(m_connection_info, wxID_ANY, _L("Failed to connect to the server"), wxT("https://wiki.bambulab.com/en/software/bambu-studio/failed-to-connect-printer"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
|
||||
// m_hyperlink->SetBackgroundColour(wxColour(255, 111, 0));
|
||||
m_hyperlink = new wxHyperlinkCtrl(m_connection_info, wxID_ANY, _L("Failed to connect to the server"), wxT("https://wiki.bambulab.com/en/software/bambu-studio/failed-to-connect-printer"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
|
||||
m_hyperlink->SetBackgroundColour(wxColour(255, 111, 0));
|
||||
|
||||
m_more_err_open = ScalableBitmap(this, "monitir_err_open", 16);
|
||||
m_more_err_close = ScalableBitmap(this, "monitir_err_close", 16);
|
||||
|
@ -302,7 +302,7 @@ SideTools::SideTools(wxWindow *parent, wxWindowID id, const wxPoint &pos, const
|
|||
|
||||
});
|
||||
|
||||
// connection_sizer_H->Add(m_hyperlink, 0, wxALIGN_CENTER | wxALL, 5);
|
||||
connection_sizer_H->Add(m_hyperlink, 0, wxALIGN_CENTER | wxALL, 5);
|
||||
connection_sizer_H->Add(m_more_button, 0, wxALIGN_CENTER | wxALL, 3);
|
||||
connection_sizer_V->Add(connection_sizer_H, 0, wxALIGN_CENTER, 0);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue