
Hi, Here is a cleaned up version of my previous patch. I have been testing it quite a bit and for me it is working OK with both dark and light backgrounds. Just to recap the issue: Dillo currently hard-codes the color black to be used as the widget selection color (checkmarks, radio buttons, etc). When using a dark background, these selections appear to be invisible. With this patch, we ensure that the selction is visible by contrasing the selection color against the background. Any feedback welcome. Regards, Alex --- a/dw/fltkui.cc Sun Apr 27 18:56:44 2025 +++ b/dw/fltkui.cc Thu May 22 15:02:20 2025 @@ -1171,8 +1171,11 @@ void FltkToggleButtonResource<I>::setWidgetStyle (Fl_W core::style::Style *style) { FltkResource::setWidgetStyle(widget, style); - - widget->selection_color(FL_BLACK); + FltkColor *bg = (FltkColor*)style->backgroundColor; + int normal_bg = bg->colors[FltkColor::SHADING_NORMAL]; + int style_fg = ((FltkColor*)style->color)->colors[FltkColor::SHADING_NORMAL]; + Fl_Color fg = fl_contrast(style_fg, normal_bg); + widget->selection_color(fg); }
participants (1)
-
a1ex@dismail.de