FIX: filament map UI issues in mac

1.Also remove a useless otion in preferences page

jira:STUDIO-10472

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I6c7052522f7c797fca35decb68879694cc1142b9
This commit is contained in:
xun.zhang 2025-02-18 17:42:12 +08:00 committed by lane.wei
parent f123058322
commit 02b4fe96a1
2 changed files with 5 additions and 6 deletions

View File

@ -122,7 +122,7 @@ GUI::FilamentMapBtnPanel::FilamentMapBtnPanel(wxWindow *parent, const wxString &
icon_disabled = create_scaled_bitmap(icon + "_disabled", nullptr, 20); icon_disabled = create_scaled_bitmap(icon + "_disabled", nullptr, 20);
m_btn = new wxBitmapButton(this, wxID_ANY, icon_enabled, wxDefaultPosition, wxDefaultSize, wxNO_BORDER); m_btn = new wxBitmapButton(this, wxID_ANY, icon_enabled, wxDefaultPosition, wxDefaultSize, wxNO_BORDER);
m_btn->SetBackgroundColour(*wxWHITE); m_btn->SetBackgroundStyle(wxBG_STYLE_PAINT);
m_label = new wxStaticText(this, wxID_ANY, label); m_label = new wxStaticText(this, wxID_ANY, label);
m_label->SetFont(Label::Head_14); m_label->SetFont(Label::Head_14);
@ -130,7 +130,7 @@ GUI::FilamentMapBtnPanel::FilamentMapBtnPanel(wxWindow *parent, const wxString &
auto label_sizer = new wxBoxSizer(wxHORIZONTAL); auto label_sizer = new wxBoxSizer(wxHORIZONTAL);
label_sizer->AddStretchSpacer(); label_sizer->AddStretchSpacer();
label_sizer->Add(m_btn, 0, wxALIGN_CENTER | wxEXPAND); label_sizer->Add(m_btn, 0, wxALIGN_CENTER | wxEXPAND | wxLEFT, FromDIP(1));
label_sizer->Add(m_label, 0, wxALIGN_CENTER | wxEXPAND| wxALL, FromDIP(3)); label_sizer->Add(m_label, 0, wxALIGN_CENTER | wxEXPAND| wxALL, FromDIP(3));
label_sizer->AddStretchSpacer(); label_sizer->AddStretchSpacer();
@ -204,11 +204,13 @@ void FilamentMapBtnPanel::UpdateStatus()
m_btn->SetBackgroundColour(BgSelectColor); m_btn->SetBackgroundColour(BgSelectColor);
m_label->SetBackgroundColour(BgSelectColor); m_label->SetBackgroundColour(BgSelectColor);
m_detail->SetBackgroundColour(BgSelectColor); m_detail->SetBackgroundColour(BgSelectColor);
m_disable_tip->SetBackgroundColour(BgSelectColor);
} }
else { else {
m_btn->SetBackgroundColour(BgNormalColor); m_btn->SetBackgroundColour(BgNormalColor);
m_label->SetBackgroundColour(BgNormalColor); m_label->SetBackgroundColour(BgNormalColor);
m_detail->SetBackgroundColour(BgNormalColor); m_detail->SetBackgroundColour(BgNormalColor);
m_disable_tip->SetBackgroundColour(BgNormalColor);
} }
if (!m_enabled) { if (!m_enabled) {
m_disable_tip->SetLabel(_L("(Sync with printer)")); m_disable_tip->SetLabel(_L("(Sync with printer)"));
@ -220,6 +222,7 @@ void FilamentMapBtnPanel::UpdateStatus()
} }
else { else {
m_disable_tip->SetLabel(""); m_disable_tip->SetLabel("");
m_disable_tip->SetForegroundColour(TextNormalBlackColor);
m_btn->SetBitmap(icon_enabled); m_btn->SetBitmap(icon_enabled);
m_btn->SetForegroundColour(BgNormalColor); m_btn->SetForegroundColour(BgNormalColor);
m_label->SetForegroundColour(TextNormalBlackColor); m_label->SetForegroundColour(TextNormalBlackColor);

View File

@ -1204,9 +1204,6 @@ wxWindow* PreferencesDialog::create_general_page()
auto title_presets = create_item_title(_L("Presets"), page, _L("Presets")); auto title_presets = create_item_title(_L("Presets"), page, _L("Presets"));
auto item_user_sync = create_item_checkbox(_L("Auto sync user presets(Printer/Filament/Process)"), page, _L("If enabled, auto sync user presets with cloud after Bambu Studio startup or presets modified."), 50, "sync_user_preset"); auto item_user_sync = create_item_checkbox(_L("Auto sync user presets(Printer/Filament/Process)"), page, _L("If enabled, auto sync user presets with cloud after Bambu Studio startup or presets modified."), 50, "sync_user_preset");
auto item_system_sync = create_item_checkbox(_L("Auto check for system presets updates"), page, _L("If enabled, auto check whether there are system presets updates after Bambu Studio startup."), 50, "sync_system_preset"); auto item_system_sync = create_item_checkbox(_L("Auto check for system presets updates"), page, _L("If enabled, auto check whether there are system presets updates after Bambu Studio startup."), 50, "sync_system_preset");
auto item_save_presets = create_item_button(_L("Clear my choice on the unsaved presets."), _L("Clear"), page, _L("Clear my choice on the unsaved presets."), []() {
wxGetApp().app_config->set("save_preset_choise", "");
});
#ifdef _WIN32 #ifdef _WIN32
auto title_associate_file = create_item_title(_L("Associate Files To Bambu Studio"), page, _L("Associate Files To Bambu Studio")); auto title_associate_file = create_item_title(_L("Associate Files To Bambu Studio"), page, _L("Associate Files To Bambu Studio"));
@ -1296,7 +1293,6 @@ wxWindow* PreferencesDialog::create_general_page()
sizer_page->Add(title_presets, 0, wxTOP | wxEXPAND, FromDIP(20)); sizer_page->Add(title_presets, 0, wxTOP | wxEXPAND, FromDIP(20));
sizer_page->Add(item_user_sync, 0, wxTOP, FromDIP(3)); sizer_page->Add(item_user_sync, 0, wxTOP, FromDIP(3));
sizer_page->Add(item_system_sync, 0, wxTOP, FromDIP(3)); sizer_page->Add(item_system_sync, 0, wxTOP, FromDIP(3));
sizer_page->Add(item_save_presets, 0, wxTOP, FromDIP(3));
#ifdef _WIN32 #ifdef _WIN32
sizer_page->Add(title_associate_file, 0, wxTOP| wxEXPAND, FromDIP(20)); sizer_page->Add(title_associate_file, 0, wxTOP| wxEXPAND, FromDIP(20));
sizer_page->Add(item_associate_3mf, 0, wxTOP, FromDIP(3)); sizer_page->Add(item_associate_3mf, 0, wxTOP, FromDIP(3));