Support for HiDPI in OpenGL on Linux / GTK3.

wxGTK3 HiDPI support seems to emulate what OSX does quite closely,
thus the changes are relatively minimal.

Also fixed an ugly rounding issue when populating the ImGUI font map
with image thumbnails.

Fixes Gtk3 issue on 4k+ screens 
Fixes HiDPI screens with Wayland on Fedora 30 cause Plater view to be too small. 
This commit is contained in:
Vojtech Bubnik 2020-12-15 12:14:30 +01:00
parent 43581059ff
commit a13b35ce92
4 changed files with 20 additions and 6 deletions
src/slic3r/GUI

View file

@ -228,7 +228,8 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_S
// OSX specific issue:
// When we move application between Retina and non-Retina displays, The legend on a canvas doesn't redraw
// So, redraw explicitly canvas, when application is moved
#if ENABLE_RETINA_GL
//FIXME maybe this is useful for __WXGTK3__ as well?
#if __APPLE__
Bind(wxEVT_MOVE, [this](wxMoveEvent& event) {
wxGetApp().plater()->get_current_canvas3D()->set_as_dirty();
wxGetApp().plater()->get_current_canvas3D()->request_extra_frame();