|
|
On 7/18/21 1:30 PM, Webb Hinton wrote:
Seems like if we have methods for setting the global text size +
global font, that there should also be a way to set the global
text color?
I suppose if there were a 'global color', before calling the
draw() of each widget,
fltk could reset the current color to that value so that the
color always starts at
some default.
When developing an app with a dark theme it can quickly
become tedious to have to manually set the label color for each
and every one of our widget classes.
Normally to do this you'd change the color map so that the new
colors affect
all widgets. See my replies in
this thread from 2020. where I show how to make
a dark theme this way. Please note there's two replies from me
in that thread;
the first describes the technique, the second shows some code
showing how to
redefine the color ramp commonly used for widget colors, and a
file format
allowing you to have different text files define different
colormaps that can
be loaded by the user while the app is running to choose
different theme colors.
Basically you get results like the below without having to
customize widgets.
Just make sure your widgets use predictable color map colors,
preferably
colors that are in the color ramp between colormap colors #32
and #56.
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/578c3984-5b60-a813-c6f1-19e9dc4ddf6e%40seriss.com.
[ Direct Link to Message ] | |
|
| |