summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2025-12-25 19:07:34 +0100
committerAlbrecht Schlosser <albrechts.fltk@online.de>2025-12-25 19:34:08 +0100
commit22c17302616acad9e4eb735d897948dee28942ae (patch)
tree78d0a192d3d04a977fddf39e43e8417e9b3cc3ca /test
parentec61d4ff4a3f3ed62cdc1d6a378efecd11e69fd2 (diff)
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.
Diffstat (limited to 'test')
-rw-r--r--test/unittests.cxx6
1 files changed, 5 insertions, 1 deletions
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 <FL/Fl_Terminal.H>
#include <FL/Fl_Group.H>
#include <FL/Fl_Box.H>
+#include <FL/Fl_Scheme.H>
#include <FL/fl_draw.H> // fl_text_extents()
#include <FL/fl_string_functions.h> // fl_strdup()
#include <FL/fl_ask.H> // 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.