mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 12:11:15 -06:00 
			
		
		
		
	ENH: replace n1 & f1 image and name Jira: [STUDIO-4008]
1. replace n1 image at LAN access code dialog 2. replace f1 text with AMS Lite Change-Id: I1385ff5b8b6ca849ed330d49f803e4632732510f Change-Id: I9e053c4123073c5bf152689e7f34ef1667c04d1d (cherry picked from commit 2ca116de0c83c17a8c994c32fa4c41a315628f86)
This commit is contained in:
		
							parent
							
								
									aa9ace3e39
								
							
						
					
					
						commit
						d3d5751814
					
				
					 5 changed files with 37 additions and 9 deletions
				
			
		
							
								
								
									
										
											BIN
										
									
								
								resources/images/input_access_code_n1_cn.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								resources/images/input_access_code_n1_cn.png
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 38 KiB | 
							
								
								
									
										
											BIN
										
									
								
								resources/images/input_access_code_n1_en.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								resources/images/input_access_code_n1_en.png
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 41 KiB | 
|  | @ -8,7 +8,6 @@ namespace Slic3r { namespace GUI { | |||
| ConnectPrinterDialog::ConnectPrinterDialog(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos, const wxSize &size, long style) | ||||
|     : DPIDialog(parent, id, _L("ConnectPrinter(LAN)"), pos, size, style) | ||||
| { | ||||
|     init_bitmap(); | ||||
|     SetBackgroundColour(*wxWHITE); | ||||
|     this->SetSizeHints(wxDefaultSize, wxDefaultSize); | ||||
| 
 | ||||
|  | @ -86,7 +85,7 @@ ConnectPrinterDialog::ConnectPrinterDialog(wxWindow *parent, wxWindowID id, cons | |||
|     wxBoxSizer *sizer_diagram; | ||||
|     sizer_diagram = new wxBoxSizer(wxHORIZONTAL); | ||||
| 
 | ||||
|     m_bitmap_diagram = new wxStaticBitmap(this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize(FromDIP(340), FromDIP(190)), 0); | ||||
|     m_bitmap_diagram = new wxStaticBitmap(this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize(FromDIP(340), -1), 0); | ||||
|     m_bitmap_diagram->SetBitmap(m_diagram_img); | ||||
|     sizer_diagram->Add(m_bitmap_diagram); | ||||
| 
 | ||||
|  | @ -117,19 +116,48 @@ void ConnectPrinterDialog::init_bitmap() | |||
| { | ||||
|     AppConfig *config = get_app_config(); | ||||
|     std::string language = config->get("language"); | ||||
|     if (language == "zh_CN") { | ||||
|         m_diagram_bmp = create_scaled_bitmap("input_access_code_cn", nullptr, 190); | ||||
| 
 | ||||
|     if (m_obj) { | ||||
|         if (m_obj->printer_type == "C11" || m_obj->printer_type == "C12") { | ||||
|             m_diagram_bmp = create_scaled_bitmap("input_accesscode_help2", nullptr, 190); | ||||
|         } | ||||
|         else if (m_obj->printer_type == "BL-P001" || m_obj->printer_type == "BL-P002") { | ||||
|             if (language == "zh_CN") { | ||||
|                 m_diagram_bmp = create_scaled_bitmap("input_access_code_cn", nullptr, 190); | ||||
|             } | ||||
|             else { | ||||
|                 m_diagram_bmp = create_scaled_bitmap("input_access_code_en", nullptr, 190); | ||||
|             } | ||||
|         } | ||||
|         else if (m_obj->printer_type == "N1") { | ||||
|             if (language == "zh_CN") { | ||||
|                 m_diagram_bmp = create_scaled_bitmap("input_access_code_n1_cn", nullptr, 250); | ||||
|             } | ||||
|             else { | ||||
|                 m_diagram_bmp = create_scaled_bitmap("input_access_code_n1_en", nullptr, 250); | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|     else{ | ||||
|         m_diagram_bmp = create_scaled_bitmap("input_access_code_en", nullptr, 190); | ||||
|     else { | ||||
|         if (language == "zh_CN") { | ||||
|             m_diagram_bmp = create_scaled_bitmap("input_access_code_cn", nullptr, 190); | ||||
|         } | ||||
|         else { | ||||
|             m_diagram_bmp = create_scaled_bitmap("input_access_code_en", nullptr, 190); | ||||
|         } | ||||
|     } | ||||
|     m_diagram_img = m_diagram_bmp.ConvertToImage(); | ||||
|     m_diagram_img.Rescale(FromDIP(340), FromDIP(190));     | ||||
|     auto bmp_size = m_diagram_bmp.GetSize(); | ||||
|     float scale = (float)FromDIP(340) / (float)bmp_size.x; | ||||
|     m_diagram_img.Rescale(FromDIP(340), bmp_size.y * scale); | ||||
|     m_bitmap_diagram->SetBitmap(m_diagram_img); | ||||
|     Fit(); | ||||
| } | ||||
| 
 | ||||
| void ConnectPrinterDialog::set_machine_object(MachineObject* obj) | ||||
| { | ||||
|     m_obj = obj; | ||||
|     init_bitmap(); | ||||
| } | ||||
| 
 | ||||
| void ConnectPrinterDialog::on_input_enter(wxCommandEvent& evt) | ||||
|  |  | |||
|  | @ -34,7 +34,7 @@ protected: | |||
|     wxBitmap        m_diagram_bmp; | ||||
|     wxImage         m_diagram_img; | ||||
| 
 | ||||
|     MachineObject*  m_obj; | ||||
|     MachineObject*  m_obj{ nullptr }; | ||||
|     wxString        m_input_access_code; | ||||
| public: | ||||
|     ConnectPrinterDialog(wxWindow *      parent, | ||||
|  |  | |||
|  | @ -147,7 +147,7 @@ MachineInfoPanel::MachineInfoPanel(wxWindow* parent, wxWindowID id, const wxPoin | |||
|     wxBoxSizer* extra_ams_content_sizer = new wxBoxSizer(wxVERTICAL); | ||||
|     extra_ams_content_sizer->Add(0, 40, 0, wxEXPAND, FromDIP(5)); | ||||
|     m_extra_ams_panel = new ExtraAmsPanel(this); | ||||
|     m_extra_ams_panel->m_staticText_ams->SetLabel("F1"); | ||||
|     m_extra_ams_panel->m_staticText_ams->SetLabel("AMS Lite"); | ||||
|     extra_ams_content_sizer->Add(m_extra_ams_panel, 0, wxEXPAND, 0); | ||||
| 
 | ||||
|     m_extra_ams_sizer->Add(extra_ams_content_sizer, 1, wxEXPAND, 0); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 liz.li
						liz.li