From 1ab727a128afa99ca135a58ec81017ce10501b31 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Thu, 1 Apr 2021 11:12:48 -0500 Subject: [PATCH] Make symbol images images scale correctly. Fixes #2957 --- Mac/MainWindow/IconView.swift | 4 ++++ Multiplatform/macOS/Article/IconView.swift | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Mac/MainWindow/IconView.swift b/Mac/MainWindow/IconView.swift index edbbbace8..43e4c8444 100644 --- a/Mac/MainWindow/IconView.swift +++ b/Mac/MainWindow/IconView.swift @@ -102,6 +102,10 @@ private extension IconView { } func rectForImageView() -> NSRect { + guard !(iconImage?.isSymbol ?? false) else { + return NSMakeRect(0.0, 0.0, bounds.size.width, bounds.size.height) + } + guard let image = iconImage?.image else { return NSRect.zero } diff --git a/Multiplatform/macOS/Article/IconView.swift b/Multiplatform/macOS/Article/IconView.swift index 6513d485d..9a72b5dd5 100644 --- a/Multiplatform/macOS/Article/IconView.swift +++ b/Multiplatform/macOS/Article/IconView.swift @@ -100,6 +100,10 @@ private extension IconView { } func rectForImageView() -> NSRect { + guard !(iconImage?.isSymbol ?? false) else { + return NSMakeRect(0.0, 0.0, bounds.size.width, bounds.size.height) + } + guard let image = iconImage?.image else { return NSRect.zero }