Since a BStringView draws the text vertically centered, it should simply use

the B_FULL_UPDATE_ON_RESIZE flag. Removed the Invalidate() call accordingly
from InvalidateLayout(). Small cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30191 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2009-04-16 09:48:37 +00:00
parent 84b7e12232
commit b10020de06
+3 -3
View File
@@ -27,7 +27,7 @@
BStringView::BStringView(BRect frame, const char* name, const char* text, BStringView::BStringView(BRect frame, const char* name, const char* text,
uint32 resizeMask, uint32 flags) uint32 resizeMask, uint32 flags)
: BView(frame, name, resizeMask, flags), : BView(frame, name, resizeMask, flags | B_FULL_UPDATE_ON_RESIZE),
fText(text ? strdup(text) : NULL), fText(text ? strdup(text) : NULL),
fAlign(B_ALIGN_LEFT), fAlign(B_ALIGN_LEFT),
fPreferredSize(-1, -1) fPreferredSize(-1, -1)
@@ -36,7 +36,7 @@ BStringView::BStringView(BRect frame, const char* name, const char* text,
BStringView::BStringView(const char* name, const char* text, uint32 flags) BStringView::BStringView(const char* name, const char* text, uint32 flags)
: BView(name, flags), : BView(name, flags | B_FULL_UPDATE_ON_RESIZE),
fText(text ? strdup(text) : NULL), fText(text ? strdup(text) : NULL),
fAlign(B_ALIGN_LEFT), fAlign(B_ALIGN_LEFT),
fPreferredSize(-1, -1) fPreferredSize(-1, -1)
@@ -60,6 +60,7 @@ BStringView::BStringView(BMessage* data)
text = NULL; text = NULL;
SetText(text); SetText(text);
SetFlags(Flags() | B_FULL_UPDATE_ON_RESIZE);
} }
@@ -298,7 +299,6 @@ BStringView::SetFont(const BFont* font, uint32 mask)
BView::SetFont(font, mask); BView::SetFont(font, mask);
InvalidateLayout(); InvalidateLayout();
Invalidate();
} }