ENH:add erase_dark.svg

jira: STUDIO-11051
Change-Id: I1ca79d708df04ab99d52d04c19454b383fc4a5aa
This commit is contained in:
zhou.xu 2025-03-22 14:08:18 +08:00 committed by lane.wei
parent d45061b607
commit c74cd2a15f
2 changed files with 18 additions and 2 deletions

View File

@ -0,0 +1,4 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.56488 0.993197C8.82745 0.56744 7.88449 0.820103 7.45874 1.55754L2.93734 9.38883C2.7187 9.76752 2.84845 10.2517 3.22713 10.4704L3.4092 10.5755L2.07447 12.8873C1.41858 14.0233 1.80781 15.476 2.94386 16.1319L7.67368 18.8626C8.80973 19.5185 10.2624 19.1293 10.9183 17.9933L12.253 15.6815L12.4361 15.7872C12.8148 16.0058 13.299 15.876 13.5176 15.4974L18.039 7.66606C18.4648 6.92863 18.2121 5.98568 17.4747 5.55992L9.56488 0.993197ZM8.68571 2.26593C8.72023 2.20614 8.79669 2.18565 8.85648 2.22017L16.7663 6.7869C16.8261 6.82142 16.8466 6.89787 16.812 6.95766L12.6032 14.2476L4.47684 9.55591L8.68571 2.26593ZM3.30145 13.5957C3.03679 14.0541 3.19385 14.6402 3.65226 14.9049L8.38208 17.6357C8.84048 17.9003 9.42664 17.7433 9.6913 17.2849L11.0259 14.9732L4.63607 11.2841L3.30145 13.5957Z" fill="#EBEBEB"/>
<path d="M17.3527 18.5051C17.3527 18.8964 17.0355 19.2135 16.6443 19.2135H8.97745C8.58622 19.2135 8.26906 18.8964 8.26906 18.5051C8.26906 18.1139 8.58622 17.7967 8.97745 17.7967H16.6443C17.0355 17.7967 17.3527 18.1139 17.3527 18.5051Z" fill="#EBEBEB"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -663,10 +663,13 @@ AmsMapingPopup::AmsMapingPopup(wxWindow *parent, bool use_in_sync_dialog) :
m_right_tips->SetLabel(m_right_tip_text);
m_sizer_ams_right_horizonal->Add(m_right_tips, 0, wxEXPAND , 0);
m_reset_btn = new ScalableButton(m_right_first_text_panel, wxID_ANY, "erase", wxEmptyString, wxDefaultSize, wxDefaultPosition, wxBU_EXACTFIT | wxNO_BORDER, true, 14);
m_reset_btn = new ScalableButton(m_right_first_text_panel, wxID_ANY, wxGetApp().dark_mode() ? "erase_dark" : "erase", wxEmptyString, wxDefaultSize, wxDefaultPosition,
wxBU_EXACTFIT | wxNO_BORDER, true, 14);
m_reset_btn->SetName(wxGetApp().dark_mode() ? "erase_dark" : "erase");
m_reset_btn->Bind(wxEVT_BUTTON, [this](wxCommandEvent &e) { reset_ams_info(); });
m_reset_btn->SetBackgroundColour(*wxWHITE);
m_reset_btn->SetToolTip(_L("Reset current filament mapping"));
m_sizer_ams_right_horizonal->AddStretchSpacer();
m_sizer_ams_right_horizonal->AddSpacer(FromDIP(5));
m_sizer_ams_right_horizonal->Add(m_reset_btn, 0, wxALIGN_TOP | wxEXPAND );
@ -721,7 +724,8 @@ void AmsMapingPopup::set_reset_callback(ResetCallback callback) {
}
void AmsMapingPopup::show_reset_button() {
m_reset_btn->Show(); }
m_reset_btn->Show();
}
void AmsMapingPopup::msw_rescale()
{
@ -960,6 +964,14 @@ void AmsMapingPopup::update(MachineObject* obj, const std::vector<FilamentInfo>&
/*title*/
update_title(obj);
if (wxGetApp().dark_mode() && m_reset_btn->GetName() != "erase_dark") {
m_reset_btn->SetName("erase_dark");
m_reset_btn->SetBitmap(ScalableBitmap(m_right_first_text_panel, "erase_dark", 14).bmp());
}
else if (!wxGetApp().dark_mode() && m_reset_btn->GetName() != "erase") {
m_reset_btn->SetName("erase");
m_reset_btn->SetBitmap(ScalableBitmap(m_right_first_text_panel, "erase", 14).bmp());
}
/*ext*/
//const auto& full_config = wxGetApp().preset_bundle->full_config();
//size_t nozzle_nums = full_config.option<ConfigOptionFloatsNullable>("nozzle_diameter")->values.size();