mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 12:41:20 -06:00 
			
		
		
		
	Merge branch 'dk_filaments' into master
This commit is contained in:
		
						commit
						95d808f7c4
					
				
					 1 changed files with 6 additions and 6 deletions
				
			
		|  | @ -191,10 +191,12 @@ PrinterPicker::PrinterPicker(wxWindow *parent, const VendorProfile &vendor, wxSt | ||||||
| 
 | 
 | ||||||
|         wxBitmap bitmap; |         wxBitmap bitmap; | ||||||
|         int bitmap_width = 0; |         int bitmap_width = 0; | ||||||
|  |         int bitmap_height = 0; | ||||||
|         const wxString bitmap_file = GUI::from_u8(Slic3r::resources_dir() + "/profiles/" + vendor.id + "/" + model.id + "_thumbnail.png"); |         const wxString bitmap_file = GUI::from_u8(Slic3r::resources_dir() + "/profiles/" + vendor.id + "/" + model.id + "_thumbnail.png"); | ||||||
|         if (wxFileExists(bitmap_file)) { |         if (wxFileExists(bitmap_file)) { | ||||||
|             bitmap.LoadFile(bitmap_file, wxBITMAP_TYPE_PNG); |             bitmap.LoadFile(bitmap_file, wxBITMAP_TYPE_PNG); | ||||||
|             bitmap_width = bitmap.GetWidth(); |             bitmap_width = bitmap.GetWidth(); | ||||||
|  |             bitmap_height = bitmap.GetHeight(); | ||||||
|         } else { |         } else { | ||||||
|             BOOST_LOG_TRIVIAL(warning) << boost::format("Can't find bitmap file `%1%` for vendor `%2%`, printer `%3%`, using placeholder icon instead") |             BOOST_LOG_TRIVIAL(warning) << boost::format("Can't find bitmap file `%1%` for vendor `%2%`, printer `%3%`, using placeholder icon instead") | ||||||
|                 % bitmap_file |                 % bitmap_file | ||||||
|  | @ -205,6 +207,7 @@ PrinterPicker::PrinterPicker(wxWindow *parent, const VendorProfile &vendor, wxSt | ||||||
|             if (wxFileExists(placeholder_file)) { |             if (wxFileExists(placeholder_file)) { | ||||||
|                 bitmap.LoadFile(placeholder_file, wxBITMAP_TYPE_PNG); |                 bitmap.LoadFile(placeholder_file, wxBITMAP_TYPE_PNG); | ||||||
|                 bitmap_width = bitmap.GetWidth(); |                 bitmap_width = bitmap.GetWidth(); | ||||||
|  |                 bitmap_height = bitmap.GetHeight(); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  | @ -274,15 +277,12 @@ PrinterPicker::PrinterPicker(wxWindow *parent, const VendorProfile &vendor, wxSt | ||||||
|             for (size_t j = i; j < i + cols; j++) { printer_grid->Add(bitmaps[j], 0, wxBOTTOM, 20); } |             for (size_t j = i; j < i + cols; j++) { printer_grid->Add(bitmaps[j], 0, wxBOTTOM, 20); } | ||||||
|             for (size_t j = i; j < i + cols; j++) { printer_grid->Add(variants_panels[j]); } |             for (size_t j = i; j < i + cols; j++) { printer_grid->Add(variants_panels[j]); } | ||||||
| 
 | 
 | ||||||
|             // Add separator space
 |             // Add separator space to multiliners
 | ||||||
|             if (i > 0) { |             if (titles.size() > cols) { | ||||||
|                 for (size_t j = i; j < i + cols; j++) { printer_grid->Add(1, 100); } |                 for (size_t j = i; j < i + cols; j++) { printer_grid->Add(1, 30); } | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
| 
 |  | ||||||
|         if (odd_items > 0) { |         if (odd_items > 0) { | ||||||
|             for (size_t i = 0; i < cols; i++) { printer_grid->Add(1, 100); } |  | ||||||
| 
 |  | ||||||
|             const size_t rem = titles.size() - odd_items; |             const size_t rem = titles.size() - odd_items; | ||||||
| 
 | 
 | ||||||
|             for (size_t i = rem; i < titles.size(); i++) { printer_grid->Add(titles[i], 0, wxBOTTOM, 3); } |             for (size_t i = rem; i < titles.size(); i++) { printer_grid->Add(titles[i], 0, wxBOTTOM, 3); } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 David Kocik
						David Kocik