mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-02 07:42:14 +00:00
Fix display issues in post-processing options group
This commit is contained in:
@@ -1998,7 +1998,6 @@ void PluginField::BUILD()
|
|||||||
// Wrap the dynamic rows in a single container panel so the field is a proper window-field
|
// Wrap the dynamic rows in a single container panel so the field is a proper window-field
|
||||||
// (getWindow() != null). The panel owns m_main_sizer; all row controls are children of it.
|
// (getWindow() != null). The panel owns m_main_sizer; all row controls are children of it.
|
||||||
auto* panel = new wxPanel(m_parent, wxID_ANY);
|
auto* panel = new wxPanel(m_parent, wxID_ANY);
|
||||||
panel->SetBackgroundStyle(wxBG_STYLE_PAINT);
|
|
||||||
wxGetApp().UpdateDarkUI(panel);
|
wxGetApp().UpdateDarkUI(panel);
|
||||||
window = panel;
|
window = panel;
|
||||||
|
|
||||||
@@ -2053,6 +2052,7 @@ void PluginField::rebuild_ui()
|
|||||||
// Report the stacked rows' size so the option-group / OG_CustomCtrl allocate the right height.
|
// Report the stacked rows' size so the option-group / OG_CustomCtrl allocate the right height.
|
||||||
window->SetMinSize(m_main_sizer->CalcMin());
|
window->SetMinSize(m_main_sizer->CalcMin());
|
||||||
window->Layout();
|
window->Layout();
|
||||||
|
window->Refresh();
|
||||||
}
|
}
|
||||||
if (m_parent)
|
if (m_parent)
|
||||||
m_parent->Layout();
|
m_parent->Layout();
|
||||||
@@ -2066,7 +2066,6 @@ void PluginField::add_empty_state_row()
|
|||||||
wxTextCtrl* display = new wxTextCtrl(window, wxID_ANY, _L("No plugin selected"),
|
wxTextCtrl* display = new wxTextCtrl(window, wxID_ANY, _L("No plugin selected"),
|
||||||
wxDefaultPosition, wxSize(def_width_wider() * m_em_unit, wxDefaultCoord),
|
wxDefaultPosition, wxSize(def_width_wider() * m_em_unit, wxDefaultCoord),
|
||||||
wxTE_READONLY);
|
wxTE_READONLY);
|
||||||
display->SetBackgroundStyle(wxBG_STYLE_PAINT);
|
|
||||||
display->SetEditable(false);
|
display->SetEditable(false);
|
||||||
wxGetApp().UpdateDarkUI(display);
|
wxGetApp().UpdateDarkUI(display);
|
||||||
display->SetToolTip(_L("No plugin selected"));
|
display->SetToolTip(_L("No plugin selected"));
|
||||||
@@ -2080,7 +2079,7 @@ void PluginField::add_empty_state_row()
|
|||||||
|
|
||||||
row_sizer->Add(display, 1, wxALIGN_CENTER_VERTICAL | wxRIGHT, 4);
|
row_sizer->Add(display, 1, wxALIGN_CENTER_VERTICAL | wxRIGHT, 4);
|
||||||
row_sizer->Add(add_btn, 0, wxALIGN_CENTER_VERTICAL);
|
row_sizer->Add(add_btn, 0, wxALIGN_CENTER_VERTICAL);
|
||||||
m_main_sizer->Add(row_sizer, 0, wxEXPAND | wxBOTTOM, 4);
|
m_main_sizer->Add(row_sizer, 0, wxEXPAND);
|
||||||
|
|
||||||
PluginRow row;
|
PluginRow row;
|
||||||
row.display = display;
|
row.display = display;
|
||||||
@@ -2106,7 +2105,6 @@ void PluginField::add_plugin_row(const wxString& value, bool is_last)
|
|||||||
wxTextCtrl* display = new wxTextCtrl(window, wxID_ANY, value,
|
wxTextCtrl* display = new wxTextCtrl(window, wxID_ANY, value,
|
||||||
wxDefaultPosition, wxSize(def_width_wider() * m_em_unit, wxDefaultCoord),
|
wxDefaultPosition, wxSize(def_width_wider() * m_em_unit, wxDefaultCoord),
|
||||||
wxTE_READONLY);
|
wxTE_READONLY);
|
||||||
display->SetBackgroundStyle(wxBG_STYLE_PAINT);
|
|
||||||
display->SetEditable(false);
|
display->SetEditable(false);
|
||||||
wxGetApp().UpdateDarkUI(display);
|
wxGetApp().UpdateDarkUI(display);
|
||||||
display->SetToolTip(get_tooltip_text(value));
|
display->SetToolTip(get_tooltip_text(value));
|
||||||
@@ -2145,7 +2143,8 @@ void PluginField::add_plugin_row(const wxString& value, bool is_last)
|
|||||||
row_sizer->Add(button_size.GetWidth(), button_size.GetHeight(), 0, wxALIGN_CENTER_VERTICAL);
|
row_sizer->Add(button_size.GetWidth(), button_size.GetHeight(), 0, wxALIGN_CENTER_VERTICAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_main_sizer->Add(row_sizer, 0, wxEXPAND | wxBOTTOM, 4);
|
const int bottom_gap = is_last ? 0 : 4;
|
||||||
|
m_main_sizer->Add(row_sizer, 0, wxEXPAND | (bottom_gap > 0 ? wxBOTTOM : 0), bottom_gap);
|
||||||
|
|
||||||
PluginRow row;
|
PluginRow row;
|
||||||
row.select_btn = select_btn;
|
row.select_btn = select_btn;
|
||||||
|
|||||||
@@ -697,7 +697,9 @@ std::string OptionsGroup::pick_plugin(const ConfigOptionDef& opt)
|
|||||||
Slic3r::PluginDescriptor descriptor;
|
Slic3r::PluginDescriptor descriptor;
|
||||||
wxString package_name = manager.get_catalog().try_get_plugin_descriptor(cap->plugin_key, descriptor)
|
wxString package_name = manager.get_catalog().try_get_plugin_descriptor(cap->plugin_key, descriptor)
|
||||||
? from_u8(descriptor.name) : from_u8(cap->plugin_key);
|
? from_u8(descriptor.name) : from_u8(cap->plugin_key);
|
||||||
entries.push_back({cap->plugin_key, cap->name, from_u8(cap->name) + " — " + package_name, package_name});
|
entries.push_back({
|
||||||
|
cap->plugin_key, cap->name, from_u8(cap->name) + from_u8(" \xE2\x80\x94 ") + package_name, package_name
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginPickerDialog dlg(m_parent, from_u8(opt.plugin_type), std::move(entries));
|
PluginPickerDialog dlg(m_parent, from_u8(opt.plugin_type), std::move(entries));
|
||||||
|
|||||||
Reference in New Issue
Block a user