forked from viewit/OrcaSlicer-KX
fix(branding): KX-Logo in allen UI-Dialogen korrekt anzeigen
- Splash: SVG durch direktes PNG-Laden ersetzt (nanosvg rendert kein eingebettetes Raster-PNG) - About-Dialog: Logo auf 125px skaliert statt unkontrolliert 192px - TroubleshootDialog, UpdateDialogs, ReleaseNote, MsgDialog: OrcaSlicer.svg → OrcaSlicer_192px.png (bereits KX-Logo)
This commit is contained in:
@ -306,8 +306,12 @@ public:
|
||||
m_fg_color = StateColor::darkModeColorFor(wxColour("#6B6A6A"));
|
||||
bool dark_mode = m_fg_color != wxColour("#6B6A6A");
|
||||
wxSize sz = m_window->GetClientSize();
|
||||
BitmapCache bmp_cache;
|
||||
m_logo_bmp = *bmp_cache.load_svg(dark_mode ? "splash_logo_dark" : "splash_logo", sz.GetWidth(), sz.GetHeight());
|
||||
// KX: load PNG directly — nanosvg cannot render embedded raster images in SVGs
|
||||
wxImage img;
|
||||
img.LoadFile(Slic3r::var("OrcaSlicer_192px.png"), wxBITMAP_TYPE_PNG);
|
||||
if (img.IsOk())
|
||||
img = img.Scale(sz.GetWidth(), sz.GetHeight(), wxIMAGE_QUALITY_HIGH);
|
||||
m_logo_bmp = img.IsOk() ? wxBitmap(img) : wxBitmap();
|
||||
|
||||
m_window->Bind(wxEVT_PAINT, &SplashScreen::OnPaint, this);
|
||||
m_window->Refresh();
|
||||
|
||||
Reference in New Issue
Block a user