ENH:hide the picture of the extruder

Change-Id: I7ca3e38570067ad769303d1d0d29d3bbde99a81e
This commit is contained in:
tao wang 2025-01-13 17:23:40 +08:00 committed by lane.wei
parent 8f5887735a
commit 15f33638a1
2 changed files with 15 additions and 15 deletions

View File

@ -23,7 +23,7 @@ StepCtrlBase::StepCtrlBase(wxWindow * parent,
, font_tip(Label::Body_14) , font_tip(Label::Body_14)
, clr_bar(0xACACAC) , clr_bar(0xACACAC)
, clr_step(0xACACAC) , clr_step(0xACACAC)
, clr_text(std::make_pair(0x00AE42, (int) StateColor::Checked), , clr_text(std::make_pair(0x00AE42, (int) StateColor::Checked),
std::make_pair(0x6B6B6B, (int) StateColor::Normal)) std::make_pair(0x6B6B6B, (int) StateColor::Normal))
, clr_tip(0x828280) , clr_tip(0x828280)
{ {
@ -49,9 +49,9 @@ void StepCtrlBase::SelectItem(int item)
Refresh(); Refresh();
} }
void StepCtrlBase::Idle() void StepCtrlBase::Idle()
{ {
step = -1; step = -1;
sendStepCtrlEvent(); sendStepCtrlEvent();
Refresh(); Refresh();
} }
@ -255,11 +255,11 @@ StepIndicator::StepIndicator(wxWindow *parent, wxWindowID id, const wxPoint &pos
font_tip = Label::Body_10; font_tip = Label::Body_10;
clr_bar = 0xE1E1E1; clr_bar = 0xE1E1E1;
clr_step = StateColor( clr_step = StateColor(
std::make_pair(0xACACAC, (int) StateColor::Disabled), std::make_pair(0xACACAC, (int) StateColor::Disabled),
std::make_pair(0x00AE42, 0)); std::make_pair(0x00AE42, 0));
clr_text = StateColor( clr_text = StateColor(
std::make_pair(0xACACAC, (int) StateColor::Disabled), std::make_pair(0xACACAC, (int) StateColor::Disabled),
std::make_pair(0x323A3D, (int) StateColor::Checked), std::make_pair(0x323A3D, (int) StateColor::Checked),
std::make_pair(0x6B6B6B, 0)); std::make_pair(0x6B6B6B, 0));
clr_tip = *wxWHITE; clr_tip = *wxWHITE;
StaticBox::border_width = 0; StaticBox::border_width = 0;
@ -288,10 +288,10 @@ void StepIndicator::doRender(wxDC &dc)
wxSize size = GetSize(); wxSize size = GetSize();
int states = state_handler.states(); int states = state_handler.states();
if (!IsEnabled()) { if (!IsEnabled()) {
states = clr_step.Disabled; states = clr_step.Disabled;
} }
int textWidth = size.x - radius * 5; int textWidth = size.x - radius * 5;
dc.SetFont(GetFont()); dc.SetFont(GetFont());
wxString firstLine; wxString firstLine;
@ -333,7 +333,7 @@ void StepIndicator::doRender(wxDC &dc)
dc.DrawText(tip, circleX - sz.x / 2, circleY - sz.y / 2 + 1); dc.DrawText(tip, circleX - sz.x / 2, circleY - sz.y / 2 + 1);
} }
// Draw step text // Draw step text
dc.SetTextForeground(clr_text.colorForStates(states dc.SetTextForeground(clr_text.colorForStates(states
| (disabled ? StateColor::Disabled : checked ? StateColor::Checked : 0))); | (disabled ? StateColor::Disabled : checked ? StateColor::Checked : 0)));
dc.SetFont(checked ? GetFont().Bold() : GetFont()); dc.SetFont(checked ? GetFont().Bold() : GetFont());
wxString text; wxString text;
@ -360,7 +360,7 @@ FilamentStepIndicator::FilamentStepIndicator(wxWindow* parent, wxWindowID id, co
, bmp_ok(this, "step_ok", 12) , bmp_ok(this, "step_ok", 12)
{ {
static Slic3r::GUI::BitmapCache cache; 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); SetFont(Label::Body_12);
font_tip = Label::Body_12; font_tip = Label::Body_12;
clr_bar = 0xE1E1E1; clr_bar = 0xE1E1E1;
@ -412,7 +412,7 @@ void FilamentStepIndicator::doRender(wxDC& dc)
dc.SetFont(::Label::Body_13); dc.SetFont(::Label::Body_13);
dc.DrawBitmap(bmp_extruder, FromDIP(250), circleY); //dc.DrawBitmap(bmp_extruder, FromDIP(250), circleY);
circleY += sz.y; circleY += sz.y;
int textWidth = size.x - radius * 5; int textWidth = size.x - radius * 5;

View File

@ -10,7 +10,7 @@ class StepCtrlBase : public StaticBox
{ {
protected: protected:
wxFont font_tip; wxFont font_tip;
StateColor clr_bar; StateColor clr_bar;
StateColor clr_step; StateColor clr_step;
StateColor clr_text; StateColor clr_text;
StateColor clr_tip; StateColor clr_tip;
@ -108,7 +108,7 @@ class FilamentStepIndicator : public StepCtrlBase
{ {
ScalableBitmap bmp_ok; ScalableBitmap bmp_ok;
wxBitmap bmp_extruder; //wxBitmap bmp_extruder;
wxString m_slot_information = ""; wxString m_slot_information = "";
public: public: