fix: fixed crash when calculating text width for a monospaced font (#1988)

This commit is contained in:
Serhiy Mytrovtsiy
2024-06-10 21:20:53 +02:00
parent a6410d8258
commit 75a7416b7e
3 changed files with 4 additions and 4 deletions

View File

@@ -136,7 +136,7 @@ public class StackWidget: WidgetWrapper {
private func drawOneRow(_ x: CGFloat, _ element: Stack_t) -> CGFloat {
var font: NSFont = NSFont.systemFont(ofSize: 13, weight: .regular)
if self.monospacedFontState {
font = NSFont.monospacedSystemFont(ofSize: 13, weight: .regular)
font = NSFont.monospacedDigitSystemFont(ofSize: 13, weight: .regular)
}
let style = NSMutableParagraphStyle()

View File

@@ -2522,7 +2522,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 2.10.16;
MARKETING_VERSION = 2.10.17;
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = eu.exelban.Stats;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -2560,7 +2560,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 2.10.16;
MARKETING_VERSION = 2.10.17;
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = eu.exelban.Stats;
PRODUCT_NAME = "$(TARGET_NAME)";

View File

@@ -17,7 +17,7 @@
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>568</string>
<string>569</string>
<key>Description</key>
<string>Simple macOS system monitor in your menu bar</string>
<key>LSApplicationCategoryType</key>