Many modern applications feature rounded corners for their windows, see Photoshop, which has rounded corners in the top left and right.
I was wondering if there is any way to implement rounded corners in FLTK. Right now, when I set my window's frame to rounded corners, the background color of my app (black) still shows through:
Any work arounds for this?
The shape member function may help in achieving what you are searching for. The below image is the window created by the example code you can find in example/shapedwindow.cxx
:
You see that you can get any shape you want. The drawback is that there is not the upper bar with window's name and close
, iconize
and enlarge
buttons. These can be made visible by adding win->border(1);
just before win->show();
in the code, but the result is not quite appealing.