Skip to content

Commit

Permalink
Merge pull request #1961 from Krypton-Suite/1946-V85-ButtonSpecs-Scaling
Browse files Browse the repository at this point in the history
- Fix "Startup" edgecase
  • Loading branch information
giduac authored Dec 17, 2024
2 parents 0baaca0 + abd8071 commit 58c491d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,10 @@ protected virtual void OnFinishDelegate(object sender, EventArgs? e) =>
{
// Get value from button spec passing inheritance redirector
Image? baseImage = ButtonSpec.GetImage(_redirector, state);
float dpiFactor = _controller?.Target.FactorDpiX ?? 1f;
return (baseImage != null)
? CommonHelper.ScaleImageForSizedDisplay(baseImage, baseImage.Width * _controller.Target.FactorDpiX,
baseImage.Height * _controller.Target.FactorDpiY)
? CommonHelper.ScaleImageForSizedDisplay(baseImage, baseImage.Width * dpiFactor,
baseImage.Height * dpiFactor)
: null;
}

Expand Down

0 comments on commit 58c491d

Please sign in to comment.