Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_layout
This commit is contained in:
commit
9d6448480e
@ -106,6 +106,7 @@ wxString file_wildcards(FileType file_type, const std::string &custom_extension)
|
||||
static std::string libslic3r_translate_callback(const char *s) { return wxGetTranslation(wxString(s, wxConvUTF8)).utf8_str().data(); }
|
||||
|
||||
#ifdef WIN32
|
||||
#if !wxVERSION_EQUAL_OR_GREATER_THAN(3,1,3)
|
||||
static void register_win32_dpi_event()
|
||||
{
|
||||
enum { WM_DPICHANGED_ = 0x02e0 };
|
||||
@ -121,6 +122,7 @@ static void register_win32_dpi_event()
|
||||
return true;
|
||||
});
|
||||
}
|
||||
#endif // !ENABLE_WX_3_1_3_DPI_CHANGED_EVENT
|
||||
|
||||
static GUID GUID_DEVINTERFACE_HID = { 0x4D1E55B2, 0xF16F, 0x11CF, 0x88, 0xCB, 0x00, 0x11, 0x11, 0x00, 0x00, 0x30 };
|
||||
|
||||
@ -408,7 +410,9 @@ bool GUI_App::on_init_inner()
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
#if !wxVERSION_EQUAL_OR_GREATER_THAN(3,1,3)
|
||||
register_win32_dpi_event();
|
||||
#endif // !ENABLE_WX_3_1_3_DPI_CHANGED_EVENT
|
||||
register_win32_device_notification_event();
|
||||
#endif // WIN32
|
||||
|
||||
|
@ -61,7 +61,9 @@ void on_window_geometry(wxTopLevelWindow *tlw, std::function<void()> callback)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !wxVERSION_EQUAL_OR_GREATER_THAN(3,1,3)
|
||||
wxDEFINE_EVENT(EVT_DPI_CHANGED_SLICER, DpiChangedEvent);
|
||||
#endif // !wxVERSION_EQUAL_OR_GREATER_THAN
|
||||
|
||||
#ifdef _WIN32
|
||||
template<class F> typename F::FN winapi_get_function(const wchar_t *dll, const char *fn_name) {
|
||||
|
@ -25,7 +25,7 @@ class wxTopLevelWindow;
|
||||
class wxRect;
|
||||
|
||||
#if ENABLE_WX_3_1_3_DPI_CHANGED_EVENT
|
||||
#define wxVERSION_EQUAL_OR_GREATER_THAN(major, minor, release) ((wxMAJOR_VERSION >= major) && (wxMINOR_VERSION >= minor) && (wxRELEASE_NUMBER >= release))
|
||||
#define wxVERSION_EQUAL_OR_GREATER_THAN(major, minor, release) ((wxMAJOR_VERSION > major) || ((wxMAJOR_VERSION == major) && (wxMINOR_VERSION > minor)) || ((wxMAJOR_VERSION == major) && (wxMINOR_VERSION == minor) && (wxRELEASE_NUMBER >= release)))
|
||||
#else
|
||||
#define wxVERSION_EQUAL_OR_GREATER_THAN(major, minor, release) 0
|
||||
#endif // ENABLE_WX_3_1_3_DPI_CHANGED_EVENT
|
||||
@ -56,6 +56,7 @@ enum { DPI_DEFAULT = 96 };
|
||||
int get_dpi_for_window(wxWindow *window);
|
||||
wxFont get_default_font_for_dpi(int dpi);
|
||||
|
||||
#if !wxVERSION_EQUAL_OR_GREATER_THAN(3,1,3)
|
||||
struct DpiChangedEvent : public wxEvent {
|
||||
int dpi;
|
||||
wxRect rect;
|
||||
@ -71,6 +72,7 @@ struct DpiChangedEvent : public wxEvent {
|
||||
};
|
||||
|
||||
wxDECLARE_EVENT(EVT_DPI_CHANGED_SLICER, DpiChangedEvent);
|
||||
#endif // !wxVERSION_EQUAL_OR_GREATER_THAN
|
||||
|
||||
template<class P> class DPIAware : public P
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user