Clarify icon rescaling condition in Button::Rescale method

This commit is contained in:
SoftFever
2026-08-18 22:17:59 +08:00
parent 7580d8ef8c
commit 6c0f5eee55

View File

@@ -254,7 +254,8 @@ void Button::SetStyle(const ButtonStyle style, const ButtonType type)
void Button::Rescale()
{
if (this->active_icon.bmp().IsOk())
// Only a named icon can be re-rasterized; one set from a wxBitmap has no source file,
if (!this->active_icon.name().empty())
this->active_icon.msw_rescale();
messureSize();