FIX: optimize click area in filament title bar

Change-Id: Id56f43b54f32730795295bb5e124898420cb0735
This commit is contained in:
chunmao.guo 2022-12-05 11:33:43 +08:00 committed by Lane.Wei
parent 36efeea30b
commit 1b995c2d47

View file

@ -621,7 +621,10 @@ Sidebar::Sidebar(Plater *parent)
p->m_panel_filament_title = new StaticBox(p->scrolled, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL | wxBORDER_NONE);
p->m_panel_filament_title->SetBackgroundColor(title_bg);
p->m_panel_filament_title->SetBackgroundColor2(0xF1F1F1);
p->m_panel_filament_title->Bind(wxEVT_LEFT_UP, [this](auto &e) {
p->m_panel_filament_title->Bind(wxEVT_LEFT_UP, [this](wxMouseEvent &e) {
if (e.GetPosition().x > (p->m_flushing_volume_btn->IsShown()
? p->m_flushing_volume_btn->GetPosition().x : p->m_bpButton_add_filament->GetPosition().x))
return;
if (p->m_panel_filament_content->GetMaxHeight() == 0)
p->m_panel_filament_content->SetMaxSize({-1, -1});
else