macOS menus have white corners on dark background under gtk+ scheme

30 views
Skip to first unread message

Gonzalo Garramuno

unread,
Apr 23, 2022, 4:10:42 PM4/23/22
to fltkc...@googlegroups.com
I opened issue #435 on GitHub with an example program, which I reproduce here as it is small. Compile with fltk-config.

#include <FL/Fl.H>
#include <FL/Enumerations.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Menu_Button.H>

void empty_cb( Fl_Widget* w, void* )
{
}

int main(int argc, char** argv)
{
Fl::scheme( "gtk+" ); // base is fine, plastic is also wrong
Fl::set_color( FL_BACKGROUND_COLOR, 64, 64, 64 );

Fl_Double_Window *window = new Fl_Double_Window(400,400,"Use RMB for menu");
Fl_Menu_Button* m = new Fl_Menu_Button(0,0,400,400);
m->type( Fl_Menu_Button::POPUP3 );

m->add( "See/White corners in menus", 0, (Fl_Callback*)empty_cb, NULL );

window->end();
window->show();

return Fl::run();
}



Gonzalo Garramuno
ggar...@gmail.com




Gonzalo Garramuno

unread,
Apr 23, 2022, 9:31:11 PM4/23/22
to fltkc...@googlegroups.com


> El 23 abr. 2022, a las 17:10, Gonzalo Garramuno <ggar...@gmail.com> escribió:
>
> I opened issue #435 on GitHub with an example program, which I reproduce here as it is small. Compile with fltk-config.

I created three patches that fix the issues for plastic, gtk+ and gleam. They are in GitHub issue #435. Please someone be kind to merge them.


Gonzalo Garramuno
ggar...@gmail.com




melcher....@googlemail.com

unread,
Apr 26, 2022, 6:49:20 AM4/26/22
to fltk.coredev
Yes, that is a known bug. Rounded boxes rely on the parent widget to draw the background which is not the case for a popup menu. I'll try to look at the fixes, time permitting.

Gonzalo Garramuño

unread,
Apr 26, 2022, 4:09:48 PM4/26/22
to fltkc...@googlegroups.com

El 26/4/22 a las 07:49, 'melcher....@googlemail.com' via fltk.coredev
escribió:
> Yes, that is a known bug. Rounded boxes rely on the parent widget to
> draw the background which is not the case for a popup menu. I'll try
> to look at the fixes, time permitting.
>
The problem shows up on normal menus, too, not just popups.  The fix I
made is drawing 4 lines in a rectangle with a FL_BLACK mixed with the
color of the menu to cover the 2 pixel corners.  It seems to work fine,
but feel free to improve the fixes if you wish.

--
Gonzalo Garramuño
ggar...@gmail.com

Bill Spitzak

unread,
Jun 12, 2022, 6:34:04 PM6/12/22
to fltkc...@googlegroups.com
I would just use square boxes for windows.

--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/0dbba520-f425-56b4-523c-15a4539133e5%40gmail.com.

Gonzalo Garramuño

unread,
Jun 27, 2022, 11:01:23 PM6/27/22
to fltkc...@googlegroups.com

El 12/6/22 a las 19:33, Bill Spitzak escribió:
> I would just use square boxes for windows.
The windows are square.  But with the different schemes, they use the
rounded edges of the schemes (which makes them look nice, except on the
corners where they leave some unpainted pixels).

--
Gonzalo Garramuño
ggar...@gmail.com

Reply all
Reply to author
Forward
0 new messages