From 094cf1f73c8ce959ffb8ecf5132c882acb8f6b1c Mon Sep 17 00:00:00 2001 From: John Othwolo Date: Mon, 7 Sep 2020 10:54:24 -0400 Subject: [PATCH] Fix cropped text in macOS Big Sur status bar This fixes the cropped out text when the "multiline" option is selected (issue #109). --- Classes/FanControl.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Classes/FanControl.m b/Classes/FanControl.m index f493b8d..c6e701a 100755 --- a/Classes/FanControl.m +++ b/Classes/FanControl.m @@ -447,7 +447,11 @@ -(void) readFanData:(id)caller{ [paragraphStyle setAlignment:NSLeftTextAlignment]; [s_status addAttribute:NSFontAttributeName value:[NSFont fontWithName:@"Lucida Grande" size:fsize] range:NSMakeRange(0,[s_status length])]; [s_status addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0,[s_status length])]; - + [s_status addAttribute:NSBaselineOffsetAttributeName + value:[NSNumber numberWithFloat: -6] + range:NSMakeRange(0, s_status.length)]; + + [s_status addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0,[s_status length])]; if (setColor) [s_status addAttribute:NSForegroundColorAttributeName value:menuColor range:NSMakeRange(0,[s_status length])];