* Fix drawing the background if needed on other shelfs than Tracker (untested).

* Fix invalidating the whole view when receiving a color drop, since the frame
  around the text input is also affected now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29893 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2009-04-04 08:08:51 +00:00
parent 2030e24a4e
commit 2833e9ea83
+3 -3
View File
@@ -284,7 +284,7 @@ void
CalcView::Draw(BRect updateRect) CalcView::Draw(BRect updateRect)
{ {
bool drawBackground = true; bool drawBackground = true;
if (Parent() && Window()->Bounds() != Frame()) { if (Parent() && (Parent()->Flags() & B_DRAW_ON_CHILDREN) != 0) {
// CalcView is embedded somewhere, most likely the Tracker Desktop // CalcView is embedded somewhere, most likely the Tracker Desktop
// shelf. // shelf.
drawBackground = false; drawBackground = false;
@@ -758,8 +758,8 @@ CalcView::Paste(BMessage *message)
if (keypadRect.Contains(dropPoint) && dropColor) { if (keypadRect.Contains(dropPoint) && dropColor) {
fBaseColor = *dropColor; fBaseColor = *dropColor;
_Colorize(); _Colorize();
// redraw keypad // redraw
Invalidate(keypadRect); Invalidate();
} }
} else { } else {