FIX:refine objecttable layout and interaction

Change-Id: If7639decffc994bfbbef3461fd02de0c06758b89
This commit is contained in:
tao wang 2022-08-31 15:13:07 +08:00 committed by Lane.Wei
parent 83b427b7e2
commit 43e69fee35
4 changed files with 212 additions and 151 deletions

View file

@ -232,11 +232,10 @@ ParamsPanel::ParamsPanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, c
m_compare_btn = new ScalableButton(m_top_panel, wxID_ANY, "compare", wxEmptyString, wxDefaultSize, wxDefaultPosition, wxBU_EXACTFIT | wxNO_BORDER, true);
m_compare_btn->SetToolTip(_L("Compare presets"));
m_compare_btn->Bind(wxEVT_BUTTON, ([this](wxCommandEvent e) { wxGetApp().mainframe->diff_dialog.show(); }));
#if !BBL_RELEASE_TO_PUBLIC
m_setting_btn = new ScalableButton(m_top_panel, wxID_ANY, "table", wxEmptyString, wxDefaultSize, wxDefaultPosition, wxBU_EXACTFIT | wxNO_BORDER, true);
m_setting_btn->SetToolTip(_L("View all object's settings"));
m_setting_btn->Bind(wxEVT_BUTTON, [this](wxCommandEvent &) { wxGetApp().plater()->PopupObjectTable(-1, -1, {0, 0}); });
#endif
m_highlighter.set_timer_owner(this, 0);
this->Bind(wxEVT_TIMER, [this](wxTimerEvent &)
@ -331,10 +330,9 @@ void ParamsPanel::create_layout()
m_mode_sizer->Add( m_title_view, 0, wxALIGN_CENTER );
m_mode_sizer->AddSpacer(FromDIP(9));
m_mode_sizer->Add( m_mode_view, 0, wxALIGN_CENTER );
#if !BBL_RELEASE_TO_PUBLIC
m_mode_sizer->AddSpacer(FromDIP(16));
m_mode_sizer->Add( m_setting_btn, 0, wxALIGN_CENTER );
#endif
m_mode_sizer->AddSpacer(FromDIP(16));
m_mode_sizer->Add( m_compare_btn, 0, wxALIGN_CENTER );
@ -591,9 +589,7 @@ void ParamsPanel::update_mode()
void ParamsPanel::msw_rescale()
{
if (m_process_icon) m_process_icon->msw_rescale();
#if !BBL_RELEASE_TO_PUBLIC
if (m_setting_btn) m_setting_btn->msw_rescale();
#endif
if (m_search_btn) m_search_btn->msw_rescale();
if (m_compare_btn) m_compare_btn->msw_rescale();
m_left_sizer->SetMinSize(wxSize(40 * em_unit(this), -1));