Fix slice/print panel background to use theme-transformed color

This commit is contained in:
SoftFever
2026-03-30 12:28:08 +08:00
parent 094dfc14bd
commit b9952b39ad

View File

@@ -1790,8 +1790,8 @@ wxBoxSizer* MainFrame::create_side_tools()
auto slice_panel = new wxPanel(this,wxID_ANY,wxDefaultPosition,wxDefaultSize);
auto print_panel = new wxPanel(this,wxID_ANY,wxDefaultPosition,wxDefaultSize);
slice_panel->SetBackgroundColour(wxColour("#3B4446"));
print_panel->SetBackgroundColour(wxColour("#3B4446"));
slice_panel->SetBackgroundColour(StateColor::darkModeColorFor(wxColour("#3B4446")));
print_panel->SetBackgroundColour(StateColor::darkModeColorFor(wxColour("#3B4446")));
m_slice_btn = new SideButton(slice_panel, _L("Slice plate"), "");
m_slice_option_btn = new SideButton(slice_panel, "", "sidebutton_dropdown", 0, 14);
@@ -2324,6 +2324,11 @@ void MainFrame::update_side_button_style()
m_print_option_btn->SetExtraSize(wxSize(FromDIP(10), FromDIP(10)));
m_print_option_btn->SetIconOffset(FromDIP(2));
m_print_option_btn->SetMinSize(wxSize(FromDIP(24), FromDIP(24)));
// Keep panel backgrounds in sync with SideButton's darkModeColorFor(#3B4446) bottom strip
auto bg = StateColor::darkModeColorFor(wxColour("#3B4446"));
m_slice_btn->GetParent()->SetBackgroundColour(bg);
m_print_btn->GetParent()->SetBackgroundColour(bg);
}
void MainFrame::update_slice_print_status(SlicePrintEventType event, bool can_slice, bool can_print)