I'm writing an OS X app and have a problem with font smoothing in separate window.
I have a text field where you put text and suggestion window which pops up with a list of suggestions according to what you wrote. I'm using View-cell based NSTableView
to display those suggestions and SFBPopoverWindowController
to display it as a "popup" window (tried other classes with the same effect). When rows are first drawn they look fine but after I select them (keyboard or mouse) the font changes it's weight. It's only visual - like you would change smoothing method on the font, not it's bold setting.
"Music note" is the selected cell here
What's even more strange is that after I hide and show the window 3 times everything works fine from that point on.
Again - "Music note" is the selected cell.
The selection is done by overwriting NSTableRowView
class and its drawSelectionInRect:
method but I tried with drawing everything inside custom NSTableCellView
class and it didn't help. The text is standard NSTextField
- nothing's changed there.
The SFBPopoverWindow (and it's controller) are created once and reused with styleMask NSBorderlessWindowMask
, backing NSBackingStoreBuffered
, defer set to YES
. The only change in SFBPopoverWindowController
I made was to turn off window becoming key window but it doesn't change anything.