mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Preferences: Beautification
Text settings: Wrap a label_text to the max 80 characters MSW specific: Update alignment of the "Dark mode" tab
This commit is contained in:
		
							parent
							
								
									9029f63d0c
								
							
						
					
					
						commit
						609bd4046c
					
				
					 2 changed files with 12 additions and 2 deletions
				
			
		| 
						 | 
					@ -21,7 +21,13 @@ void ButtonsDescription::FillSizerWithTextColorDescriptions(wxSizer* sizer, wxWi
 | 
				
			||||||
	ScalableBitmap bmp_delete_focus = ScalableBitmap(parent, "cross_focus");
 | 
						ScalableBitmap bmp_delete_focus = ScalableBitmap(parent, "cross_focus");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	auto add_color = [grid_sizer, parent](wxColourPickerCtrl** color_picker, const wxColour& color, const wxColour& def_color, wxString label_text) {
 | 
						auto add_color = [grid_sizer, parent](wxColourPickerCtrl** color_picker, const wxColour& color, const wxColour& def_color, wxString label_text) {
 | 
				
			||||||
		//
 | 
							// wrap the label_text to the max 80 characters
 | 
				
			||||||
 | 
							if (label_text.Len() > 80) {
 | 
				
			||||||
 | 
								size_t brack_pos = label_text.find_last_of(" ", 79);
 | 
				
			||||||
 | 
								if (brack_pos > 0 && brack_pos < 80)
 | 
				
			||||||
 | 
									label_text.insert(brack_pos + 1, "\n");
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		auto sys_label = new wxStaticText(parent, wxID_ANY, label_text);
 | 
							auto sys_label = new wxStaticText(parent, wxID_ANY, label_text);
 | 
				
			||||||
		sys_label->SetForegroundColour(color);
 | 
							sys_label->SetForegroundColour(color);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -519,7 +519,11 @@ void PreferencesDialog::build(size_t selected_tab)
 | 
				
			||||||
void PreferencesDialog::update_ctrls_alignment()
 | 
					void PreferencesDialog::update_ctrls_alignment()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	int max_ctrl_width{ 0 };
 | 
						int max_ctrl_width{ 0 };
 | 
				
			||||||
	std::initializer_list<ConfigOptionsGroup*> og_list = { m_optgroup_general.get(), m_optgroup_camera.get(), m_optgroup_gui.get() };
 | 
						std::initializer_list<ConfigOptionsGroup*> og_list = { m_optgroup_general.get(), m_optgroup_camera.get(), m_optgroup_gui.get() 
 | 
				
			||||||
 | 
					#ifdef _WIN32
 | 
				
			||||||
 | 
							, m_optgroup_dark_mode.get()
 | 
				
			||||||
 | 
					#endif // _WIN32
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
	for (auto og : og_list) {
 | 
						for (auto og : og_list) {
 | 
				
			||||||
		if (int max = og->custom_ctrl->get_max_win_width();
 | 
							if (int max = og->custom_ctrl->get_max_win_width();
 | 
				
			||||||
			max_ctrl_width < max)
 | 
								max_ctrl_width < max)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue