mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 12:41:20 -06:00 
			
		
		
		
	Suppress edit of items of UnsavedChangesDialog, fixed update of the information line
+ added white version for icons "exit" and "switch_presets"
This commit is contained in:
		
							parent
							
								
									f1c9d39302
								
							
						
					
					
						commit
						a61d0a9532
					
				
					 4 changed files with 66 additions and 8 deletions
				
			
		
							
								
								
									
										13
									
								
								resources/icons/white/exit.svg
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								resources/icons/white/exit.svg
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,13 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  --> | ||||
| <svg version="1.0" id="exit" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" | ||||
| 	 viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve"> | ||||
| <path fill="#ED6B21" d="M63.4,45.46l-20-15c-2.51-1.88-6.06-1.37-7.94,1.13c-1.88,2.5-1.37,6.06,1.13,7.94l6.39,4.79H10 | ||||
| 	c-3.13,0-5.67,2.54-5.67,5.67s2.54,5.67,5.67,5.67h32.99l-6.39,4.8c-2.5,1.88-3.01,5.43-1.13,7.94c1.11,1.49,2.82,2.27,4.54,2.27 | ||||
| 	c1.18,0,2.38-0.37,3.4-1.13l20-15c1.43-1.07,2.27-2.75,2.27-4.54C65.67,48.22,64.83,46.54,63.4,45.46z"/> | ||||
| <g> | ||||
| 	<path fill="#FFFFFF" d="M90,92.83H40c-1.57,0-2.83-1.27-2.83-2.83V80c0-1.57,1.27-2.83,2.83-2.83s2.83,1.27,2.83,2.83v7.17h44.33 | ||||
| 		V12.83H42.83V20c0,1.57-1.27,2.83-2.83,2.83s-2.83-1.27-2.83-2.83V10c0-1.57,1.27-2.83,2.83-2.83h50c1.57,0,2.83,1.27,2.83,2.83v80 | ||||
| 		C92.83,91.57,91.57,92.83,90,92.83z"/> | ||||
| </g> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 997 B | 
							
								
								
									
										52
									
								
								resources/icons/white/switch_presets.svg
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										52
									
								
								resources/icons/white/switch_presets.svg
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,52 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  --> | ||||
| <svg version="1.0" id="change_x5F_profile_copy" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" | ||||
| 	 x="0px" y="0px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve"> | ||||
| <rect x="-45" y="5" display="none" fill="#FFFFFF" width="55" height="90"/> | ||||
| <rect x="90" y="5" transform="matrix(-1 -1.224647e-16 1.224647e-16 -1 235 100)" display="none" fill="#FFFFFF" width="55" height="90"/> | ||||
| <path fill="#ED6B21" d="M88.52,28.64c-1.25-0.94-3.03-0.69-3.97,0.57l-1.72,2.29V15c0-1.57-1.27-2.83-2.83-2.83H65 | ||||
| 	c-1.57,0-2.83,1.27-2.83,2.83s1.27,2.83,2.83,2.83h12.17V31.5l-1.72-2.29c-0.94-1.25-2.72-1.5-3.97-0.57 | ||||
| 	c-1.25,0.94-1.51,2.72-0.57,3.97l6.82,9.09c0.54,0.71,1.38,1.13,2.27,1.13s1.73-0.42,2.27-1.13l6.82-9.09 | ||||
| 	C90.03,31.36,89.77,29.58,88.52,28.64z"/> | ||||
| <path fill="#ED6B21" d="M35,82.17H22.83V68.5l1.72,2.29c0.56,0.74,1.41,1.13,2.27,1.13c0.59,0,1.19-0.18,1.7-0.57 | ||||
| 	c1.25-0.94,1.51-2.72,0.57-3.97l-6.82-9.09c-0.54-0.71-1.38-1.13-2.27-1.13s-1.73,0.42-2.27,1.13l-6.82,9.09 | ||||
| 	c-0.94,1.25-0.69,3.03,0.57,3.97c1.25,0.94,3.03,0.69,3.97-0.57l1.72-2.29V85c0,1.57,1.27,2.83,2.83,2.83h15 | ||||
| 	c1.57,0,2.83-1.27,2.83-2.83S36.57,82.17,35,82.17z"/> | ||||
| <polyline display="none" fill="none" stroke="#ED6B21" stroke-width="11.3386" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points=" | ||||
| 	35,65 15,50 35,35 "/> | ||||
| <g> | ||||
| 	<path fill="#FFFFFF" d="M50.01,41.11c0-0.75-0.3-1.47-0.83-2l-1.99-1.99H50c1.57,0,2.83-1.27,2.83-2.83v-8.57 | ||||
| 		c0-1.57-1.27-2.83-2.83-2.83h-2.81l1.99-1.99c0.53-0.53,0.83-1.25,0.83-2s-0.3-1.47-0.83-2l-6.06-6.06c-1.06-1.06-2.95-1.06-4.01,0 | ||||
| 		l-1.99,1.99V10c0-1.57-1.27-2.83-2.83-2.83h-8.57c-1.57,0-2.83,1.27-2.83,2.83v2.81l-1.99-1.99c-0.53-0.53-1.25-0.83-2-0.83 | ||||
| 		s-1.47,0.3-2,0.83l-6.06,6.06c-0.53,0.53-0.83,1.25-0.83,2s0.3,1.47,0.83,2l1.99,1.99H10c-1.57,0-2.83,1.27-2.83,2.83v8.57 | ||||
| 		c0,1.57,1.27,2.83,2.83,2.83h2.81l-1.99,1.99c-0.53,0.53-0.83,1.25-0.83,2s0.3,1.47,0.83,2l6.06,6.06c1.11,1.11,2.9,1.11,4.01,0 | ||||
| 		l1.99-1.99V50c0,1.57,1.27,2.83,2.83,2.83h8.57c1.57,0,2.83-1.27,2.83-2.83v-2.81l1.99,1.99c1.11,1.11,2.9,1.11,4.01,0l6.06-6.06 | ||||
| 		C49.71,42.58,50.01,41.86,50.01,41.11z M47.17,31.45h-2.05c-1.27,0-2.38,0.84-2.73,2.06c-0.27,0.96-0.66,1.89-1.14,2.76 | ||||
| 		c-0.62,1.11-0.43,2.49,0.47,3.39l1.45,1.45l-2.05,2.05l-1.45-1.45c-0.9-0.9-2.28-1.09-3.39-0.47c-0.87,0.49-1.8,0.87-2.76,1.14 | ||||
| 		c-1.22,0.35-2.06,1.46-2.06,2.73v2.05h-2.9v-2.05c0-1.27-0.84-2.38-2.06-2.73c-0.96-0.27-1.89-0.66-2.76-1.14 | ||||
| 		c-1.11-0.62-2.49-0.43-3.39,0.47l-1.45,1.45l-2.05-2.05l1.45-1.45c0.9-0.9,1.09-2.28,0.47-3.39c-0.49-0.87-0.87-1.8-1.14-2.76 | ||||
| 		c-0.35-1.22-1.46-2.06-2.73-2.06h-2.05v-2.9h2.05c1.27,0,2.38-0.84,2.73-2.06c0.27-0.96,0.66-1.89,1.14-2.76 | ||||
| 		c0.62-1.11,0.43-2.49-0.47-3.39l-1.45-1.45l2.05-2.05l1.45,1.45c0.9,0.9,2.28,1.09,3.39,0.47c0.87-0.49,1.8-0.87,2.76-1.14 | ||||
| 		c1.22-0.35,2.06-1.46,2.06-2.73v-2.05h2.9v2.05c0,1.27,0.84,2.38,2.06,2.73c0.96,0.27,1.89,0.66,2.76,1.14 | ||||
| 		c1.11,0.62,2.49,0.43,3.39-0.47l1.45-1.45l2.05,2.05l-1.45,1.45c-0.9,0.9-1.09,2.28-0.47,3.39c0.49,0.87,0.87,1.8,1.14,2.76 | ||||
| 		c0.35,1.22,1.46,2.06,2.73,2.06h2.05V31.45z"/> | ||||
| 	<path fill="#FFFFFF" d="M90,62.88h-2.81l1.99-1.99c1.11-1.11,1.11-2.9,0-4.01l-6.06-6.06c-1.11-1.11-2.9-1.11-4.01,0l-1.99,1.99V50 | ||||
| 		c0-1.57-1.27-2.83-2.83-2.83h-8.57c-1.57,0-2.83,1.27-2.83,2.83v2.81l-1.99-1.99c-1.11-1.11-2.9-1.11-4.01,0l-6.06,6.06 | ||||
| 		c-1.11,1.11-1.11,2.9,0,4.01l1.99,1.99H50c-1.57,0-2.83,1.27-2.83,2.83v8.57c0,1.57,1.27,2.83,2.83,2.83h2.81l-1.99,1.99 | ||||
| 		c-1.11,1.11-1.11,2.9,0,4.01l6.06,6.06c1.11,1.11,2.9,1.11,4.01,0l1.99-1.99V90c0,1.57,1.27,2.83,2.83,2.83h8.57 | ||||
| 		c1.57,0,2.83-1.27,2.83-2.83v-2.81l1.99,1.99c1.11,1.11,2.9,1.11,4.01,0l6.06-6.06c1.11-1.11,1.11-2.9,0-4.01l-1.99-1.99H90 | ||||
| 		c1.57,0,2.83-1.27,2.83-2.83v-8.57C92.83,64.15,91.57,62.88,90,62.88z M87.17,71.45h-2.05c-1.27,0-2.38,0.84-2.73,2.06 | ||||
| 		c-0.27,0.96-0.66,1.89-1.14,2.76c-0.62,1.11-0.43,2.49,0.47,3.39l1.45,1.45l-2.05,2.05l-1.45-1.45c-0.9-0.9-2.28-1.09-3.39-0.47 | ||||
| 		c-0.87,0.49-1.8,0.87-2.76,1.15c-1.22,0.35-2.06,1.46-2.06,2.73v2.05h-2.9v-2.05c0-1.27-0.84-2.38-2.06-2.73 | ||||
| 		c-0.96-0.27-1.89-0.66-2.76-1.15c-1.11-0.62-2.49-0.43-3.39,0.47l-1.45,1.45l-2.05-2.05l1.45-1.45c0.9-0.9,1.09-2.28,0.47-3.39 | ||||
| 		c-0.49-0.87-0.87-1.8-1.14-2.76c-0.35-1.22-1.46-2.06-2.73-2.06h-2.05v-2.9h2.05c1.27,0,2.38-0.84,2.73-2.06 | ||||
| 		c0.27-0.96,0.66-1.89,1.14-2.76c0.62-1.11,0.43-2.49-0.47-3.39l-1.45-1.45l2.05-2.05l1.45,1.45c0.9,0.9,2.28,1.09,3.39,0.47 | ||||
| 		c0.87-0.49,1.8-0.87,2.76-1.14c1.22-0.35,2.06-1.46,2.06-2.73v-2.05h2.9v2.05c0,1.27,0.84,2.38,2.06,2.73 | ||||
| 		c0.96,0.27,1.89,0.66,2.76,1.14c1.11,0.62,2.49,0.43,3.39-0.47l1.45-1.45l2.05,2.05l-1.45,1.45c-0.9,0.9-1.09,2.28-0.47,3.39 | ||||
| 		c0.49,0.87,0.87,1.8,1.14,2.76c0.35,1.22,1.46,2.06,2.73,2.06h2.05V71.45z"/> | ||||
| 	<path fill="#FFFFFF" d="M30,22.17c-4.32,0-7.83,3.51-7.83,7.83s3.51,7.83,7.83,7.83s7.83-3.51,7.83-7.83S34.32,22.17,30,22.17z | ||||
| 		 M30,32.17c-1.19,0-2.17-0.97-2.17-2.17s0.97-2.17,2.17-2.17s2.17,0.97,2.17,2.17S31.19,32.17,30,32.17z"/> | ||||
| 	<path fill="#FFFFFF" d="M70,62.17c-4.32,0-7.83,3.51-7.83,7.83s3.51,7.83,7.83,7.83s7.83-3.51,7.83-7.83S74.32,62.17,70,62.17z | ||||
| 		 M70,72.17c-1.19,0-2.17-0.97-2.17-2.17s0.97-2.17,2.17-2.17s2.17,0.97,2.17,2.17S71.19,72.17,70,72.17z"/> | ||||
| </g> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 5.2 KiB | 
|  | @ -597,7 +597,7 @@ void UnsavedChangesDialog::build(Preset::Type type, PresetCollection* dependent_ | |||
| #endif | ||||
|         wxDataViewColumn* column = new wxDataViewColumn(label, rd, model_column, width, wxALIGN_TOP, wxDATAVIEW_COL_RESIZABLE | wxDATAVIEW_CELL_INERT); | ||||
| #else | ||||
|         wxDataViewColumn* column = new wxDataViewColumn(label, new BitmapTextRenderer(true), model_column, width, wxALIGN_TOP, wxDATAVIEW_COL_RESIZABLE); | ||||
|         wxDataViewColumn* column = new wxDataViewColumn(label, new BitmapTextRenderer(true, wxDATAVIEW_CELL_INERT), model_column, width, wxALIGN_TOP, wxDATAVIEW_COL_RESIZABLE); | ||||
| #endif //__linux__
 | ||||
|         m_tree->AppendColumn(column); | ||||
|         if (set_expander) | ||||
|  | @ -727,8 +727,6 @@ void UnsavedChangesDialog::context_menu(wxDataViewEvent& event) | |||
| 
 | ||||
| void UnsavedChangesDialog::show_info_line(Action action, std::string preset_name) | ||||
| { | ||||
|     if (m_motion_action == action) | ||||
|         return; | ||||
|     if (action == Action::Undef && !m_has_long_strings) | ||||
|         m_info_line->Hide(); | ||||
|     else { | ||||
|  | @ -752,8 +750,6 @@ void UnsavedChangesDialog::show_info_line(Action action, std::string preset_name | |||
|         m_info_line->Show(); | ||||
|     } | ||||
| 
 | ||||
|     m_motion_action = action; | ||||
| 
 | ||||
|     Layout(); | ||||
|     Refresh(); | ||||
| } | ||||
|  |  | |||
|  | @ -210,9 +210,6 @@ class UnsavedChangesDialog : public DPIDialog | |||
|     // selected action after Dialog closing
 | ||||
|     Action m_exit_action {Action::Undef}; | ||||
| 
 | ||||
|     // Action during mouse motion
 | ||||
|     Action m_motion_action {Action::Undef}; | ||||
| 
 | ||||
|     struct ItemData | ||||
|     { | ||||
|         std::string     opt_key; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 YuSanka
						YuSanka