Albrecht Schlosser wrote:
> Is this what you mean?
Yes -- that's it.
Just being able to specify the color to contrast against (the bg color),
not the actual color to draw.
However, in actual practice, it seems widgets like Fl_Browser use
a "two step" approach to drawing the focus box: (my comments in
uppercase)
* * *
if (l == selection_ && Fl::focus() == this) {
draw_box(FL_BORDER_FRAME, X, yy+Y, W, hh, color()); // DRAW 1 PIXEL
THICK WHITE RECTANGLE LINE
draw_focus(FL_NO_BOX, X, yy+Y, W+1, hh+1); // DRAW DOTTED
BLACK RECTANGLE LINE OVER IT
}
* * *
Given an Fl_Browser with a white background and a dragged out selection
color
of e.g. dark blue, this results in a black/white dotted line over the
selection,
which reads quite well.
I imagine this black/white box looks OK over any selection color.
Oddly, the Thunderbird mail reader's multiselect browser does the same
thing;
a white/black focus box over the non-white background color during
selections.
So I guess this white/black dotted line is some kind of "standard" for
focus boxes,
in which case I guess I should do the same.
It's just a little ugly because there's an assumption in the above code
about
draw_focus() needing +1/+1 offsets for width/height to get the
rectangles to
overlap.
But I guess I'll do that if "that's how things are done".
In which case the RFC isn't needed really after all.
> Or did you want to specify the (exact) color to draw the dotted
> focus box with?
No, I personally don't need to set the exact color.
Contrast is fine.
But given the above, I'm thinking the mod maybe isn't needed.
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev