From 64603764f9db75da43d9672eb986255684d6f112 Mon Sep 17 00:00:00 2001 From: Marc Flerackers Date: Mon, 16 Jun 2003 06:33:32 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3533 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/CheckBox.cpp | 38 ++++++++++++++++----------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/src/kits/interface/CheckBox.cpp b/src/kits/interface/CheckBox.cpp index 738c26524b..3223f24958 100644 --- a/src/kits/interface/CheckBox.cpp +++ b/src/kits/interface/CheckBox.cpp @@ -85,8 +85,8 @@ void BCheckBox::Draw(BRect updateRect) // If the focus is changing, just redraw the focus indicator if (IsFocusChanging()) { - float x = ceil(10.0f + fh.ascent); - float y = 5.0f + ceil(fh.ascent); + float x = (float)ceil(10.0f + fh.ascent); + float y = 5.0f + (float)ceil(fh.ascent); if (IsFocus()) SetHighColor(ui_color(B_KEYBOARD_NAVIGATION_COLOR)); @@ -107,7 +107,8 @@ void BCheckBox::Draw(BRect updateRect) darken4 = tint_color(no_tint, B_DARKEN_4_TINT), darkenmax = tint_color(no_tint, B_DARKEN_MAX_TINT); - BRect rect(1.0f, 3.0f, ceil(3.0f + fh.ascent), ceil(5.0f + fh.ascent)); + BRect rect(1.0f, 3.0f, (float)ceil(3.0f + fh.ascent), + (float)ceil(5.0f + fh.ascent)); if (IsEnabled()) { @@ -173,14 +174,14 @@ void BCheckBox::Draw(BRect updateRect) // Label SetHighColor(darkenmax); - DrawString(Label(), BPoint(ceil(10.0f + fh.ascent), - 3.0f + ceil(fh.ascent))); + DrawString(Label(), BPoint((float)ceil(10.0f + fh.ascent), + 3.0f + (float)ceil(fh.ascent))); // Focus if (IsFocus()) { - float x = ceil(10.0f + fh.ascent); - float y = 5.0f + ceil(fh.ascent); + float x = (float)ceil(10.0f + fh.ascent); + float y = 5.0f + (float)ceil(fh.ascent); SetHighColor(ui_color(B_KEYBOARD_NAVIGATION_COLOR)); StrokeLine(BPoint(x, y), BPoint(x + StringWidth(Label()), y)); @@ -228,8 +229,8 @@ void BCheckBox::Draw(BRect updateRect) // Label SetHighColor(tint_color(no_tint, B_DISABLED_LABEL_TINT)); - DrawString(Label(), BPoint(ceil(10.0f + fh.ascent), - 3.0f + ceil(fh.ascent))); + DrawString(Label(), BPoint((float)ceil(10.0f + fh.ascent), + 3.0f + (float)ceil(fh.ascent))); } } //------------------------------------------------------------------------------ @@ -318,17 +319,14 @@ void BCheckBox::MouseUp(BPoint point) if (fOutlined) { - if (fOutlined) - { - fOutlined = false; - SetValue(!Value()); - Invoke(); - } - else - { - Draw(Bounds()); - Flush(); - } + fOutlined = false; + SetValue(!Value()); + Invoke(); + } + else + { + Draw(Bounds()); + Flush(); } SetTracking(false);