diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2006-09-25 16:36:52 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2006-09-25 16:36:52 +0000 |
| commit | faddffcf182e60b5ed41781e350dc1fddedb6fac (patch) | |
| tree | 01a0f22ec02fc64d076a87de287b83ee2df70f7c /src/Fl_Button.cxx | |
| parent | 69dcc7c685455496ca9654e53e984bd4dec9fd6d (diff) | |
src/Fl_Button.cxx:
- Fl_Button::draw(): Only use fl_contrast() on the label
color when value() is non-zero.
src/fl_color.cxx:
- fl_contrast(): Require at least 1/3 (85) instead of 1/2
(127) for contrast against the background.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5489 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Button.cxx')
| -rw-r--r-- | src/Fl_Button.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Fl_Button.cxx b/src/Fl_Button.cxx index a4e545f42..984ecf0a2 100644 --- a/src/Fl_Button.cxx +++ b/src/Fl_Button.cxx @@ -62,7 +62,7 @@ void Fl_Button::draw() { if (type() == FL_HIDDEN_BUTTON) return; Fl_Color col = value() ? selection_color() : color(); draw_box(value() ? (down_box()?down_box():fl_down(box())) : box(), col); - if (labeltype() == FL_NORMAL_LABEL) { + if (labeltype() == FL_NORMAL_LABEL && value()) { Fl_Color c = labelcolor(); labelcolor(fl_contrast(c, col)); draw_label(); |
