From dcf0c6ebd6b131811d93e2758eabfa9247cd7b8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Mon, 16 May 2005 11:57:13 +0000 Subject: [PATCH] The anti-aliasing in Haiku requires the same carefulness with B_OP_COPY for line drawing as text drawing does in R5 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12682 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/CheckBox.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/kits/interface/CheckBox.cpp b/src/kits/interface/CheckBox.cpp index d070964cd7..f938869be2 100644 --- a/src/kits/interface/CheckBox.cpp +++ b/src/kits/interface/CheckBox.cpp @@ -154,6 +154,8 @@ BCheckBox::Draw(BRect updateRect) SetHighColor(ui_color(B_KEYBOARD_NAVIGATION_COLOR)); SetPenSize(2); +// Yes, Haiku is differnt because of the anti-aliasing +SetLowColor(lightenmax); StrokeLine(BPoint(rect.left, rect.top), BPoint(rect.right, rect.bottom)); StrokeLine(BPoint(rect.left, rect.bottom), @@ -163,6 +165,8 @@ BCheckBox::Draw(BRect updateRect) // Label SetHighColor(darkenmax); +// reset low color for text +SetLowColor(no_tint); DrawString(Label(), BPoint((float)ceil(10.0f + fontHeight.ascent), 3.0f + (float)ceil(fontHeight.ascent))); @@ -204,6 +208,8 @@ BCheckBox::Draw(BRect updateRect) SetHighColor(tint_color(ui_color(B_KEYBOARD_NAVIGATION_COLOR), B_DISABLED_MARK_TINT)); +// Yes, Haiku is differnt because of the anti-aliasing +SetLowColor(lightenmax); SetPenSize(2); StrokeLine(BPoint(rect.left, rect.top), BPoint(rect.right, rect.bottom)); @@ -214,6 +220,8 @@ BCheckBox::Draw(BRect updateRect) // Label SetHighColor(tint_color(no_tint, B_DISABLED_LABEL_TINT)); +// reset low color for text +SetLowColor(no_tint); DrawString(Label(), BPoint((float)ceil(10.0f + fontHeight.ascent), 3.0f + (float)ceil(fontHeight.ascent))); }