Fixed build on Linux
This commit is contained in:
parent
0cdc54b710
commit
f1ff59bafe
2 changed files with 26 additions and 23 deletions
|
@ -4,6 +4,7 @@
|
|||
#include <vector>
|
||||
#include <string>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/stattext.h>
|
||||
|
@ -11,6 +12,7 @@
|
|||
#include <wx/button.h>
|
||||
#include <wx/statbox.h>
|
||||
#include <wx/wupdlock.h>
|
||||
#include <wx/listctrl.h>
|
||||
|
||||
#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)
|
||||
{
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
class wxListCtrl;
|
||||
class wxImageList;
|
||||
class wxListEvent;
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
|
|
Loading…
Reference in a new issue