MeetingBar icon indicating copy to clipboard operation
MeetingBar copied to clipboard

Bug: Text isn't aligned properly in "show time under title" mode

Open lef0u opened this issue 7 months ago • 3 comments

macOS version

15.5 (24F74)

MeetingBar version

4.11.2

Installation source

AppStore

Calendars provider

Google Calendar

Bug description

Text isn't aligned properly (it's too high) when 'time' is set to 'show under title'

Image

Reproduction steps

  1. Go to MeetingBar's Preferences
  2. Select 'Appearance' in the top bar
  3. Under 'Status bar' section set 'Time' to 'show under title'

Expected behavior

No response

Screenshots/screen recordings

No response

Additional context

No response

lef0u avatar Jun 04 '25 09:06 lef0u

Hi @lef0u! I'm Dosu and I’m helping the MeetingBar team.

There are no existing tickets or discussions about the text alignment issue in "show time under title" mode.

The alignment for this mode is controlled in the StatusBarItemController class, specifically in the updateTitle method. When "show time under title" is enabled, the code creates an NSMutableAttributedString with a paragraph style that sets lineHeightMultiple to 0.7 and centers the text. It also applies a baselineOffset of -3 to the title, which likely causes the text to appear too high in the menu bar. Adjusting the baselineOffset (for example, trying values closer to 0) or tweaking the lineHeightMultiple may help achieve better vertical alignment. You can find the relevant code and style settings here.

Testing different values for these properties in the updateTitle method should help resolve the alignment issue across macOS versions.

To reply, just mention my name @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

dosubot[bot] avatar Jun 04 '25 09:06 dosubot[bot]

For what it's worth, I think this is basically regression of the "fix" which was done for https://github.com/leits/MeetingBar/issues/175 four years ago. That fix was, when running on Big Sur, to completely hide the option that was refusing to be positioned very well. I'm not sure how #available() (and later #unavailable()) work, but I suspect it was hidden for "Big Sur and above". But then the conditional disablement was very recently dropped (c3c6ee1f). Guessing the intent of that cleanup commit (to flatten #available()s and #unavailable()s), I suspect the option should have been completely removed at that time, right @leits ? but instead I think that's when it started appearing for everyone again?

Yes, I went down this rabbit hole because I too would like to use this mode, to use less space on my screen. But if it was an easy fix, I imagine it would have been fixed back then rather than hiding it. :) Maybe modern macOSes have made this easier?

neb avatar Jun 16 '25 21:06 neb

Good catch @neb, thanks!

I'll check if it can be done better in modern macOS versions, or delete this option.

leits avatar Jun 17 '25 13:06 leits