diff --git a/src/slic3r/GUI/GalleryDialog.cpp b/src/slic3r/GUI/GalleryDialog.cpp index ab0b0b6839..dd3778cc62 100644 --- a/src/slic3r/GUI/GalleryDialog.cpp +++ b/src/slic3r/GUI/GalleryDialog.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include @@ -11,6 +12,7 @@ #include #include #include +#include #include "GUI.hpp" #include "GUI_App.hpp" @@ -140,32 +142,32 @@ void GalleryDialog::on_dpi_changed(const wxRect& suggested_rect) Refresh(); } -static void add_border(wxImage& image) -{ - const wxColour& clr = wxGetApp().get_color_hovered_btn_label(); +//static void add_border(wxImage& image) +//{ +// const wxColour& clr = wxGetApp().get_color_hovered_btn_label(); - auto px_data = (uint8_t*)image.GetData(); - auto a_data = (uint8_t*)image.GetAlpha(); +// auto px_data = (uint8_t*)image.GetData(); +// auto a_data = (uint8_t*)image.GetAlpha(); - int width = image.GetWidth(); - int height = image.GetHeight(); - int border_width = 1; +// int width = image.GetWidth(); +// int height = image.GetHeight(); +// int border_width = 1; - for (size_t x = 0; x < width; ++x) { - for (size_t y = 0; y < height; ++y) { - if (x < border_width || y < border_width || - x >= (width - border_width) || y >= (height - border_width)) { - const size_t idx = (x + y * width); - const size_t idx_rgb = (x + y * width) * 3; - px_data[idx_rgb] = clr.Red(); - px_data[idx_rgb + 1] = clr.Green(); - px_data[idx_rgb + 2] = clr.Blue(); - if (a_data) - a_data[idx] = 255u; - } - } - } -} +// for (size_t x = 0; x < width; ++x) { +// for (size_t y = 0; y < height; ++y) { +// if (x < border_width || y < border_width || +// x >= (width - border_width) || y >= (height - border_width)) { +// const size_t idx = (x + y * width); +// const size_t idx_rgb = (x + y * width) * 3; +// px_data[idx_rgb] = clr.Red(); +// px_data[idx_rgb + 1] = clr.Green(); +// px_data[idx_rgb + 2] = clr.Blue(); +// if (a_data) +// a_data[idx] = 255u; +// } +// } +// } +//} static void add_lock(wxImage& image) { diff --git a/src/slic3r/GUI/GalleryDialog.hpp b/src/slic3r/GUI/GalleryDialog.hpp index cfc56987f6..de120512f4 100644 --- a/src/slic3r/GUI/GalleryDialog.hpp +++ b/src/slic3r/GUI/GalleryDialog.hpp @@ -5,6 +5,7 @@ class wxListCtrl; class wxImageList; +class wxListEvent; namespace Slic3r {