From 9c7e3f864b48f7f3c2d0494648882b53c238e5b5 Mon Sep 17 00:00:00 2001 From: tao wang Date: Mon, 13 Jan 2025 17:23:40 +0800 Subject: [PATCH] ENH:hide the picture of the extruder Change-Id: I7ca3e38570067ad769303d1d0d29d3bbde99a81e (cherry picked from commit 15f33638a1017572aea3523e916328e47cb8861e) --- src/slic3r/GUI/Widgets/StepCtrl.cpp | 26 +++++++++++++------------- src/slic3r/GUI/Widgets/StepCtrl.hpp | 4 ++-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/slic3r/GUI/Widgets/StepCtrl.cpp b/src/slic3r/GUI/Widgets/StepCtrl.cpp index d394b2234c..503554b670 100644 --- a/src/slic3r/GUI/Widgets/StepCtrl.cpp +++ b/src/slic3r/GUI/Widgets/StepCtrl.cpp @@ -23,7 +23,7 @@ StepCtrlBase::StepCtrlBase(wxWindow * parent, , font_tip(Label::Body_14) , clr_bar(0xACACAC) , clr_step(0xACACAC) - , clr_text(std::make_pair(0x009688, (int) StateColor::Checked), + , clr_text(std::make_pair(0x009688, (int) StateColor::Checked), std::make_pair(0x6B6B6B, (int) StateColor::Normal)) , clr_tip(0x828280) { @@ -49,9 +49,9 @@ void StepCtrlBase::SelectItem(int item) Refresh(); } -void StepCtrlBase::Idle() -{ - step = -1; +void StepCtrlBase::Idle() +{ + step = -1; sendStepCtrlEvent(); Refresh(); } @@ -255,11 +255,11 @@ StepIndicator::StepIndicator(wxWindow *parent, wxWindowID id, const wxPoint &pos font_tip = Label::Body_10; clr_bar = 0xE1E1E1; clr_step = StateColor( - std::make_pair(0xACACAC, (int) StateColor::Disabled), + std::make_pair(0xACACAC, (int) StateColor::Disabled), std::make_pair(0x009688, 0)); clr_text = StateColor( - std::make_pair(0xACACAC, (int) StateColor::Disabled), - std::make_pair(0x323A3D, (int) StateColor::Checked), + std::make_pair(0xACACAC, (int) StateColor::Disabled), + std::make_pair(0x323A3D, (int) StateColor::Checked), std::make_pair(0x6B6B6B, 0)); clr_tip = *wxWHITE; StaticBox::border_width = 0; @@ -288,10 +288,10 @@ void StepIndicator::doRender(wxDC &dc) wxSize size = GetSize(); int states = state_handler.states(); - if (!IsEnabled()) { + if (!IsEnabled()) { states = clr_step.Disabled; - } - + } + int textWidth = size.x - radius * 5; dc.SetFont(GetFont()); wxString firstLine; @@ -333,7 +333,7 @@ void StepIndicator::doRender(wxDC &dc) dc.DrawText(tip, circleX - sz.x / 2, circleY - sz.y / 2 + 1); } // Draw step text - dc.SetTextForeground(clr_text.colorForStates(states + dc.SetTextForeground(clr_text.colorForStates(states | (disabled ? StateColor::Disabled : checked ? StateColor::Checked : 0))); dc.SetFont(checked ? GetFont().Bold() : GetFont()); wxString text; @@ -360,7 +360,7 @@ FilamentStepIndicator::FilamentStepIndicator(wxWindow* parent, wxWindowID id, co , bmp_ok(this, "step_ok", 12) { static Slic3r::GUI::BitmapCache cache; - bmp_extruder = *cache.load_png("filament_load_extruder", FromDIP(300), FromDIP(200), false, false); + //bmp_extruder = *cache.load_png("filament_load_extruder", FromDIP(300), FromDIP(200), false, false); SetFont(Label::Body_12); font_tip = Label::Body_12; clr_bar = 0xE1E1E1; @@ -412,7 +412,7 @@ void FilamentStepIndicator::doRender(wxDC& dc) dc.SetFont(::Label::Body_13); - dc.DrawBitmap(bmp_extruder, FromDIP(250), circleY); + //dc.DrawBitmap(bmp_extruder, FromDIP(250), circleY); circleY += sz.y; int textWidth = size.x - radius * 5; diff --git a/src/slic3r/GUI/Widgets/StepCtrl.hpp b/src/slic3r/GUI/Widgets/StepCtrl.hpp index 303eee0305..f59f9aac85 100644 --- a/src/slic3r/GUI/Widgets/StepCtrl.hpp +++ b/src/slic3r/GUI/Widgets/StepCtrl.hpp @@ -10,7 +10,7 @@ class StepCtrlBase : public StaticBox { protected: wxFont font_tip; - StateColor clr_bar; + StateColor clr_bar; StateColor clr_step; StateColor clr_text; StateColor clr_tip; @@ -108,7 +108,7 @@ class FilamentStepIndicator : public StepCtrlBase { ScalableBitmap bmp_ok; - wxBitmap bmp_extruder; + //wxBitmap bmp_extruder; wxString m_slot_information = ""; public: