
Hi Rodrigo, Rodrigo Arias <rodarima@gmail.com> wrote:
For some reason is always hardcoded to be black. Here is making it always red:
Thanks, looks great now!
See commit fa967f233fe6da82a98aaf3e2149d7aa5e1516cc for context, but not sure why is not just inheriting the CSS foreground color.
Here is a working patch which I believe fixes it so that it uses the foreground color: diff -upr a/dw/fltkui.cc b/dw/fltkui.cc --- a/dw/fltkui.cc Sun Apr 27 18:56:44 2025 +++ b/dw/fltkui.cc Wed May 21 14:01:08 2025 @@ -1171,8 +1171,12 @@ 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); } Regards, Alex