summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-12-07 13:55:40 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2014-12-07 13:55:40 -0500
commit9ac7ddb31d3d4633716a9ec1a99d21ca27878744 (patch)
tree772ee6f0492398532bb8fe0b23e8f3e142f1c533 /libs
parentb37be190f322cb27e28c3819a9c5e37b55a6fea3 (diff)
remove all explicit button text colors; use contrasting_text_color() instead.
Also, use a slightly off-white rather than pure white, which should really be configurable
Diffstat (limited to 'libs')
-rw-r--r--libs/canvas/colors.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/canvas/colors.cc b/libs/canvas/colors.cc
index 361023d300..fc1bf47457 100644
--- a/libs/canvas/colors.cc
+++ b/libs/canvas/colors.cc
@@ -201,7 +201,9 @@ luminance (uint32_t c)
uint32_t
ArdourCanvas::contrasting_text_color (uint32_t c)
{
- static const uint32_t white = ArdourCanvas::rgba_to_color (1.0, 1.0, 1.0, 1.0);
+ /* use a slightly off-white... XXX should really look this up */
+
+ static const uint32_t white = ArdourCanvas::rgba_to_color (0.98, 0.98, 0.98, 1.0);
static const uint32_t black = ArdourCanvas::rgba_to_color (0.0, 0.0, 0.0, 1.0);
return (luminance (c) < 0.50) ? white : black;