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

@@ -42,6 +42,8 @@ public:
void Hide();
void Show();
void Select(bool selected);
bool Enable(bool enable);
bool IsEnabled() const { return m_enabled; }
protected:
void OnPaint(wxPaintEvent &event);
private:
@@ -53,6 +55,8 @@ private:
wxBitmapButton *m_btn;
wxStaticText *m_label;
Label *m_detail;
std::string m_icon_path;
bool m_enabled{ true };
bool m_hover{false};
bool m_selected{false};
};
@@ -60,7 +64,7 @@ private:
class FilamentMapAutoPanel : public wxPanel
{
public:
FilamentMapAutoPanel(wxWindow *parent, FilamentMapMode mode);
FilamentMapAutoPanel(wxWindow *parent, FilamentMapMode mode, bool machine_synced);
void Hide();
void Show();
FilamentMapMode GetMode() const { return m_mode; }