From e5e95d48ccbd8baa77d5c94b79da36f4300e4230 Mon Sep 17 00:00:00 2001 From: "xun.zhang" Date: Tue, 18 Feb 2025 17:42:12 +0800 Subject: [PATCH] FIX: filament map UI issues in mac 1.Also remove a useless otion in preferences page jira:STUDIO-10472 Signed-off-by: xun.zhang Change-Id: I6c7052522f7c797fca35decb68879694cc1142b9 (cherry picked from commit 02b4fe96a121f7bff1b30ddf73ff99f2b7e6d6f3) --- src/slic3r/GUI/FilamentMapPanel.cpp | 7 +++++-- src/slic3r/GUI/Preferences.cpp | 4 ---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/slic3r/GUI/FilamentMapPanel.cpp b/src/slic3r/GUI/FilamentMapPanel.cpp index cf68ee8c3a..1ab65b681d 100644 --- a/src/slic3r/GUI/FilamentMapPanel.cpp +++ b/src/slic3r/GUI/FilamentMapPanel.cpp @@ -122,7 +122,7 @@ GUI::FilamentMapBtnPanel::FilamentMapBtnPanel(wxWindow *parent, const wxString & icon_disabled = create_scaled_bitmap(icon + "_disabled", nullptr, 20); 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->SetFont(Label::Head_14); @@ -130,7 +130,7 @@ GUI::FilamentMapBtnPanel::FilamentMapBtnPanel(wxWindow *parent, const wxString & auto label_sizer = new wxBoxSizer(wxHORIZONTAL); 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->AddStretchSpacer(); @@ -204,11 +204,13 @@ void FilamentMapBtnPanel::UpdateStatus() m_btn->SetBackgroundColour(BgSelectColor); m_label->SetBackgroundColour(BgSelectColor); m_detail->SetBackgroundColour(BgSelectColor); + m_disable_tip->SetBackgroundColour(BgSelectColor); } else { m_btn->SetBackgroundColour(BgNormalColor); m_label->SetBackgroundColour(BgNormalColor); m_detail->SetBackgroundColour(BgNormalColor); + m_disable_tip->SetBackgroundColour(BgNormalColor); } if (!m_enabled) { m_disable_tip->SetLabel(_L("(Sync with printer)")); @@ -220,6 +222,7 @@ void FilamentMapBtnPanel::UpdateStatus() } else { m_disable_tip->SetLabel(""); + m_disable_tip->SetForegroundColour(TextNormalBlackColor); m_btn->SetBitmap(icon_enabled); m_btn->SetForegroundColour(BgNormalColor); m_label->SetForegroundColour(TextNormalBlackColor); diff --git a/src/slic3r/GUI/Preferences.cpp b/src/slic3r/GUI/Preferences.cpp index ef16cbe232..424613ac62 100644 --- a/src/slic3r/GUI/Preferences.cpp +++ b/src/slic3r/GUI/Preferences.cpp @@ -1235,9 +1235,6 @@ wxWindow* PreferencesDialog::create_general_page() auto title_network = create_item_title(_L("Network"), page, _L("Network")); auto item_user_sync = create_item_checkbox(_L("Auto sync user presets (Printer/Filament/Process)"), page, _L("User Sync"), 50, "sync_user_preset"); auto item_system_sync = create_item_checkbox(_L("Update built-in Presets automatically."), page, _L("System Sync"), 50, "sync_system_preset"); - auto item_save_presets = create_item_button(_L("Clear my choice on the unsaved presets."), _L("Clear"), page, L"", _L("Clear my choice on the unsaved presets."), []() { - wxGetApp().app_config->set("save_preset_choise", ""); - }); #ifdef _WIN32 auto title_associate_file = create_item_title(_L("Associate files to OrcaSlicer"), page, _L("Associate files to OrcaSlicer")); @@ -1327,7 +1324,6 @@ wxWindow* PreferencesDialog::create_general_page() sizer_page->Add(item_user_sync, 0, wxTOP, FromDIP(3)); sizer_page->Add(item_system_sync, 0, wxTOP, FromDIP(3)); sizer_page->Add(item_remember_printer_config, 0, wxTOP, FromDIP(3)); - sizer_page->Add(item_save_presets, 0, wxTOP, FromDIP(3)); sizer_page->Add(title_network, 0, wxTOP | wxEXPAND, FromDIP(20)); sizer_page->Add(item_check_stable_version_only, 0, wxTOP, FromDIP(3)); sizer_page->Add(item_stealth_mode, 0, wxTOP, FromDIP(3));