mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-29 09:37:23 +08:00
Merge branch 'dk_filaments' into master
This commit is contained in:
commit
95d808f7c4
@ -191,10 +191,12 @@ PrinterPicker::PrinterPicker(wxWindow *parent, const VendorProfile &vendor, wxSt
|
||||
|
||||
wxBitmap bitmap;
|
||||
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");
|
||||
if (wxFileExists(bitmap_file)) {
|
||||
bitmap.LoadFile(bitmap_file, wxBITMAP_TYPE_PNG);
|
||||
bitmap_width = bitmap.GetWidth();
|
||||
bitmap_height = bitmap.GetHeight();
|
||||
} else {
|
||||
BOOST_LOG_TRIVIAL(warning) << boost::format("Can't find bitmap file `%1%` for vendor `%2%`, printer `%3%`, using placeholder icon instead")
|
||||
% bitmap_file
|
||||
@ -205,6 +207,7 @@ PrinterPicker::PrinterPicker(wxWindow *parent, const VendorProfile &vendor, wxSt
|
||||
if (wxFileExists(placeholder_file)) {
|
||||
bitmap.LoadFile(placeholder_file, wxBITMAP_TYPE_PNG);
|
||||
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(variants_panels[j]); }
|
||||
|
||||
// Add separator space
|
||||
if (i > 0) {
|
||||
for (size_t j = i; j < i + cols; j++) { printer_grid->Add(1, 100); }
|
||||
// Add separator space to multiliners
|
||||
if (titles.size() > cols) {
|
||||
for (size_t j = i; j < i + cols; j++) { printer_grid->Add(1, 30); }
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
for (size_t i = rem; i < titles.size(); i++) { printer_grid->Add(titles[i], 0, wxBOTTOM, 3); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user