* Fixed a font sensitivity issue not visible under BeOS.

* IconView now draws a rectangle in case there is no icon to let the
  user know there is something he could click on.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16628 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2006-03-07 14:09:30 +00:00
parent 0c4d975c52
commit 9638d4c877
2 changed files with 9 additions and 1 deletions
+3 -1
View File
@@ -138,6 +138,7 @@ FileTypeWindow::FileTypeWindow(BPoint position, const BMessage& refs)
NULL, menu);
fPreferredField->GetPreferredSize(&width, &height);
fPreferredField->ResizeTo(rect.Width(), height);
constrainingView->ResizeTo(rect.Width(), height);
constrainingView->AddChild(fPreferredField);
// we embed the menu field in another view to make it behave like
// we want so that it can't obscure other elements with larger
@@ -145,7 +146,7 @@ FileTypeWindow::FileTypeWindow(BPoint position, const BMessage& refs)
box->AddChild(constrainingView);
rect.OffsetBy(0.0f, fTypeControl->Bounds().Height() + 5.0f);
rect.OffsetBy(0.0f, height + 5.0f);
fSelectAppButton = new BButton(rect, "select app", "Select" B_UTF8_ELLIPSIS,
new BMessage(kMsgSelectPreferredApp), B_FOLLOW_LEFT | B_FOLLOW_TOP);
fSelectAppButton->ResizeToPreferred();
@@ -156,6 +157,7 @@ FileTypeWindow::FileTypeWindow(BPoint position, const BMessage& refs)
new BMessage(kMsgSamePreferredAppAs), B_FOLLOW_LEFT | B_FOLLOW_TOP);
fSameAppAsButton->ResizeToPreferred();
box->AddChild(fSameAppAsButton);
box->ResizeBy(0.0f, height - fTypeControl->Bounds().Height());
ResizeTo(fSameAppAsButton->Frame().right + 100.0f, box->Frame().bottom + 8.0f);
SetSizeLimits(fSameAppAsButton->Frame().right + iconBoxWidth + 32.0f, 32767.0f,
+6
View File
@@ -47,6 +47,12 @@ IconView::Draw(BRect updateRect)
DrawBitmap(fHeapIcon, BPoint(0.0f, 0.0f));
else if (fIcon != NULL)
DrawBitmap(fIcon, BPoint(0.0f, 0.0f));
else {
// draw frame so that the user knows here is something he
// might be able to click on
SetHighColor(tint_color(ViewColor(), B_DARKEN_1_TINT));
StrokeRect(Bounds());
}
}