Hi, When using a dark theme, the scrollbar can be very hard to see: https://alex.envs.net/test/scroll-theme-stock1.png I made some changes and now the scrollbar looks nicer and is more visible: https://alex.envs.net/test/scroll-theme-mod1.png If someone wants to try it, here is a patch which also includes some commented lines which you can use to further customize the appearance of the scrollbar. -Alex --- a/dw/fltkviewport.cc Sat Oct 12 22:05:30 2024 +++ b/dw/fltkviewport.cc Sun Oct 13 16:23:06 2024 @@ -59,12 +59,20 @@ FltkViewport::FltkViewport (int X, int Y, int W, int H hscrollbar = new CustScrollbar (x (), y (), 1, 1); hscrollbar->type(FL_HORIZONTAL); + // Horizontal scrollbar theme options: + // hscrollbar->color(FL_BLUE, FL_YELLOW); + // hscrollbar->box(FL_ENGRAVED_BOX); + hscrollbar->slider(FL_PLASTIC_DOWN_BOX); hscrollbar->callback (hscrollbarCallback, this); hscrollbar->hide(); add (hscrollbar); vscrollbar = new Fl_Scrollbar (x (), y(), 1, 1); vscrollbar->type(FL_VERTICAL); + // Vertical scrollbar theme options: + // vscrollbar->color(FL_BLUE, FL_YELLOW); + // vscrollbar->box(FL_ENGRAVED_BOX); + vscrollbar->slider(FL_PLASTIC_DOWN_BOX); vscrollbar->callback (vscrollbarCallback, this); vscrollbar->hide(); add (vscrollbar);
Hi, On Sun, Oct 13, 2024 at 05:56:26PM +0200, a1ex@dismail.de wrote:
Hi,
When using a dark theme, the scrollbar can be very hard to see:
https://alex.envs.net/test/scroll-theme-stock1.png
I made some changes and now the scrollbar looks nicer and is more visible:
https://alex.envs.net/test/scroll-theme-mod1.png
If someone wants to try it, here is a patch which also includes some commented lines which you can use to further customize the appearance of the scrollbar.
I think this is a side effect of altering the colormap only partially. I would imagine that by mapping *all* light colors to dark counterparts, you will get coherent box borders. Here is more info: https://www.fltk.org/doc-1.3/drawing.html https://www.fltk.org/doc-1.3/drawing.html#drawing_colors This is an example of such colormap that may be easy to try using Fl:set_color(): https://github.com/fltk-rs/fltk-theme/blob/main/src/color_themes/dark.rs https://www.fltk.org/doc-1.3/group__fl__attributes.html#gac62f634ba8089a9d0e... Best, Rodrigo.
participants (2)
-
a1ex@dismail.de
-
Rodrigo Arias