mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 01:37:53 -06:00
Added processing of a wxEVT_SYS_COLOUR_CHANGED event.
Deleted scale from ImGuiWrapper::load_svg(), because it's no needed and it makes icons bad scaled on Retina displays
This commit is contained in:
parent
ae7bb123a9
commit
4348b177d6
2 changed files with 21 additions and 10 deletions
|
@ -805,14 +805,6 @@ static const ImWchar ranges_keyboard_shortcuts[] =
|
|||
|
||||
std::vector<unsigned char> ImGuiWrapper::load_svg(const std::string& bitmap_name, unsigned target_width, unsigned target_height)
|
||||
{
|
||||
#ifdef __APPLE__
|
||||
// Note: win->GetContentScaleFactor() is not used anymore here because it tends to
|
||||
// return bogus results quite often (such as 1.0 on Retina or even 0.0).
|
||||
// We're using the max scaling factor across all screens because it's very likely to be good enough.
|
||||
double scale = mac_max_scaling_factor();
|
||||
#else
|
||||
double scale = 1.0;
|
||||
#endif
|
||||
std::vector<unsigned char> empty_vector;
|
||||
|
||||
#ifdef __WXMSW__
|
||||
|
@ -827,8 +819,6 @@ std::vector<unsigned char> ImGuiWrapper::load_svg(const std::string& bitmap_name
|
|||
if (image == nullptr)
|
||||
return empty_vector;
|
||||
|
||||
target_height != 0 ? target_height *= scale : target_width *= scale;
|
||||
|
||||
float svg_scale = target_height != 0 ?
|
||||
(float)target_height / image->height : target_width != 0 ?
|
||||
(float)target_width / image->width : 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue