From 22c17302616acad9e4eb735d897948dee28942ae Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Thu, 25 Dec 2025 19:07:34 +0100 Subject: Add Fl_Scheme::plastic_color_average() method [#464] This method can be used to set a more appropriate color average to prevent "graying out" the box colors of the 'plastic' scheme. Alternatively environment variable 'FLTK_PLASTIC_AVERAGE' can be used to set the color average value. See docs for details. Set color average to 45% in test/unittests demo program. --- test/unittests.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/unittests.cxx b/test/unittests.cxx index 0e38022ff..7d537cc75 100644 --- a/test/unittests.cxx +++ b/test/unittests.cxx @@ -1,7 +1,7 @@ // // Unit tests for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2022 by Bill Spitzak and others. +// Copyright 1998-2025 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -32,6 +32,7 @@ #include #include #include +#include #include // fl_text_extents() #include // fl_strdup() #include // fl_message() @@ -469,6 +470,9 @@ int main(int argc, char** argv) { } } + // Set a more appropriate color average for the "plastic" scheme (since FLTK 1.5) + Fl_Scheme::plastic_color_average(45); + mainwin->resizable(mainwin); mainwin->show(argc, argv); // Select first test in browser, and show that test. -- cgit v1.2.3