ENH: refine some ui logics with filament map

1. Optimize performance with pop up
2. Optimize display in dark mode

jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: Ic0f72a42e791fb58b84e7a88d7a34ced3a9e8c38
(cherry picked from commit 481ebc4a4b9353d8c9ef9d6bf64cb0006364e839)
This commit is contained in:
xun.zhang
2024-12-28 16:21:29 +08:00
committed by Noisyfox
parent b297ab18ee
commit 347cd4aadd
12 changed files with 175 additions and 112 deletions

View File

@@ -1607,6 +1607,7 @@ wxBoxSizer* MainFrame::create_side_tools()
g_filament_map,
filament_lists,
FilamentMapMode::fmmManual,
m_plater->get_machine_sync_status(),
false
);
auto ret = filament_dlg.ShowModal();
@@ -1635,10 +1636,9 @@ wxBoxSizer* MainFrame::create_side_tools()
});
m_slice_btn->Bind(wxEVT_ENTER_WINDOW, [this](wxMouseEvent& event) {
m_filament_group_popup->SetSize(wxSize(FromDIP(380),-1));
wxPoint pos = m_slice_btn->ClientToScreen(wxPoint(0, 0));
pos.y += m_slice_btn->GetRect().height * 1.25;
pos.x -= (m_slice_option_btn->GetRect().width + m_filament_group_popup->GetRect().width * 0.6);
pos.x -= (m_slice_option_btn->GetRect().width + FromDIP(380) * 0.6);
m_filament_group_popup->SetPosition(pos);
m_filament_group_popup->tryPopup(m_plater->get_machine_sync_status());