* Fixed bug #3574 - this is only a temporary fix, though, as the BControlLook
class must take care of these things. * Automatic whitespace cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29574 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+11
-11
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2001-2007, Haiku, Inc.
|
* Copyright (c) 2001-2009, Haiku, Inc.
|
||||||
* Distributed under the terms of the MIT license.
|
* Distributed under the terms of the MIT license.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@@ -180,7 +180,7 @@ BBox::InnerFrame()
|
|||||||
|
|
||||||
void
|
void
|
||||||
BBox::SetLabel(const char *string)
|
BBox::SetLabel(const char *string)
|
||||||
{
|
{
|
||||||
_ClearLabel();
|
_ClearLabel();
|
||||||
|
|
||||||
if (string)
|
if (string)
|
||||||
@@ -319,9 +319,9 @@ BBox::FrameResized(float width, float height)
|
|||||||
// invalidate the regions that the app_server did not
|
// invalidate the regions that the app_server did not
|
||||||
// (for removing the previous or drawing the new border)
|
// (for removing the previous or drawing the new border)
|
||||||
if (fStyle != B_NO_BORDER) {
|
if (fStyle != B_NO_BORDER) {
|
||||||
|
// TODO: this must be made part of the be_control_look stuff!
|
||||||
int32 borderSize = fStyle == B_PLAIN_BORDER ? 0 : 1;
|
int32 borderSize = fStyle == B_PLAIN_BORDER ? 0 : 2;
|
||||||
|
|
||||||
BRect invalid(bounds);
|
BRect invalid(bounds);
|
||||||
if (fBounds.right < bounds.right) {
|
if (fBounds.right < bounds.right) {
|
||||||
// enlarging
|
// enlarging
|
||||||
@@ -335,7 +335,7 @@ BBox::FrameResized(float width, float height)
|
|||||||
|
|
||||||
Invalidate(invalid);
|
Invalidate(invalid);
|
||||||
}
|
}
|
||||||
|
|
||||||
invalid = bounds;
|
invalid = bounds;
|
||||||
if (fBounds.bottom < bounds.bottom) {
|
if (fBounds.bottom < bounds.bottom) {
|
||||||
// enlarging
|
// enlarging
|
||||||
@@ -594,7 +594,7 @@ void
|
|||||||
BBox::_InitObject(BMessage* archive)
|
BBox::_InitObject(BMessage* archive)
|
||||||
{
|
{
|
||||||
fBounds = Bounds();
|
fBounds = Bounds();
|
||||||
|
|
||||||
fLabel = NULL;
|
fLabel = NULL;
|
||||||
fLabelView = NULL;
|
fLabelView = NULL;
|
||||||
fLayoutData = new LayoutData;
|
fLayoutData = new LayoutData;
|
||||||
@@ -611,7 +611,7 @@ BBox::_InitObject(BMessage* archive)
|
|||||||
|
|
||||||
if (flags != 0)
|
if (flags != 0)
|
||||||
SetFont(&font, flags);
|
SetFont(&font, flags);
|
||||||
|
|
||||||
if (archive != NULL) {
|
if (archive != NULL) {
|
||||||
const char *string;
|
const char *string;
|
||||||
if (archive->FindString("_label", &string) == B_OK)
|
if (archive->FindString("_label", &string) == B_OK)
|
||||||
@@ -726,9 +726,9 @@ BBox::_DrawFancy(BRect labelBox)
|
|||||||
BPoint(rect.right, rect.bottom), light);
|
BPoint(rect.right, rect.bottom), light);
|
||||||
AddLine(BPoint(rect.right, rect.bottom - 1.0),
|
AddLine(BPoint(rect.right, rect.bottom - 1.0),
|
||||||
BPoint(rect.right, rect.top), light);
|
BPoint(rect.right, rect.top), light);
|
||||||
|
|
||||||
rect.InsetBy(1.0, 1.0);
|
rect.InsetBy(1.0, 1.0);
|
||||||
|
|
||||||
AddLine(BPoint(rect.left, rect.bottom - 1.0),
|
AddLine(BPoint(rect.left, rect.bottom - 1.0),
|
||||||
BPoint(rect.left, rect.top), light);
|
BPoint(rect.left, rect.top), light);
|
||||||
AddLine(BPoint(rect.left + 1.0, rect.top),
|
AddLine(BPoint(rect.left + 1.0, rect.top),
|
||||||
@@ -816,7 +816,7 @@ BBox::_ValidateLayoutData()
|
|||||||
|
|
||||||
// total number of pixel the border adds
|
// total number of pixel the border adds
|
||||||
float addWidth = fLayoutData->insets.left + fLayoutData->insets.right;
|
float addWidth = fLayoutData->insets.left + fLayoutData->insets.right;
|
||||||
float addHeight = fLayoutData->insets.top + fLayoutData->insets.bottom;
|
float addHeight = fLayoutData->insets.top + fLayoutData->insets.bottom;
|
||||||
|
|
||||||
// compute the minimal width induced by the label
|
// compute the minimal width induced by the label
|
||||||
float minWidth;
|
float minWidth;
|
||||||
|
|||||||
Reference in New Issue
Block a user