Hi,

I am currently trying to make an FLTK window on Mac OS X with rounded 
bottom corners. Unfortunately I have been unsuccessful so far.
My attempts include changing the initial window style mask in 
Fl_cocoa.mm to include NSTexturedBackgroundWindowMask. This changes the 
appearance of the title bar, but the bottom corners are still not round, 
although they should be according to the OS X Developer Library.

Another attempt was to change the style after the creation of the window 
like that

void change_style(void* w)
{[(NSWindow*) w 
setStyleMask:NSTitledWindowMask|NSClosableWindowMask|NSMiniaturizbableWindowMask|NSTexturedBackgroundWindowMask];
}

and call with

change_style(fl_xid(mywindow));

with the same results.

In both cases the resize strips in the lower right corner are drawn by 
FLTK and by the the OS which looks pretty ugly, since they are not drawn 
at exactly the same location.

I also tried this:

[(NSWindow*) w setContentBorderThickness:32.0 forEdge:NSMinYEdge];

which resulted in a program crash. Since I have found that method on a 
Mac developer forum I assume that it actually should work but I haven't 
called it at the right moment.

There would be another solution to initialize the window borderless and 
completely transparent and then do all the drawing and handling myself. 
Before I do that I would like to explore simpler alternatives.

Does anybody of the MacOS X gurus here have any ideas what else I could 
try? Can it be done at all with FLTK?

Thanks a lot for your help.

Cheers,

Herman
_______________________________________________
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to