From 05e3a10655ca9cf0055fea8b90b44486913fa5cf Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sun, 17 Jun 2007 01:11:08 +0000 Subject: [PATCH] Rather use B_SIZE_UNSET for fPreferredSize. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21425 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/CheckBox.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/kits/interface/CheckBox.cpp b/src/kits/interface/CheckBox.cpp index 70e28e5176..3294f5b3df 100644 --- a/src/kits/interface/CheckBox.cpp +++ b/src/kits/interface/CheckBox.cpp @@ -18,7 +18,7 @@ BCheckBox::BCheckBox(BRect frame, const char *name, const char *label, BMessage *message, uint32 resizingMode, uint32 flags) : BControl(frame, name, label, message, resizingMode, flags), - fPreferredSize(-1, -1), + fPreferredSize(), fOutlined(false) { // Resize to minimum height if needed @@ -34,7 +34,7 @@ BCheckBox::BCheckBox(BRect frame, const char *name, const char *label, BCheckBox::BCheckBox(const char *name, const char *label, BMessage *message, uint32 flags) : BControl(name, label, message, flags | B_WILL_DRAW | B_NAVIGABLE), - fPreferredSize(-1, -1), + fPreferredSize(), fOutlined(false) { } @@ -42,7 +42,7 @@ BCheckBox::BCheckBox(const char *name, const char *label, BMessage *message, BCheckBox::BCheckBox(const char *label, BMessage *message) : BControl(NULL, label, message, B_WILL_DRAW | B_NAVIGABLE), - fPreferredSize(-1, -1), + fPreferredSize(), fOutlined(false) { } @@ -458,7 +458,7 @@ void BCheckBox::InvalidateLayout(bool descendants) { // invalidate cached preferred size - fPreferredSize.Set(-1, -1); + fPreferredSize.Set(B_SIZE_UNSET, B_SIZE_UNSET); BControl::InvalidateLayout(descendants); } @@ -514,7 +514,7 @@ BCheckBox::_CheckBoxFrame() const BSize BCheckBox::_ValidatePreferredSize() { - if (fPreferredSize.width < 0) { + if (!fPreferredSize.IsWidthSet()) { font_height fontHeight; GetFontHeight(&fontHeight);