예제 #1
0
void
MimeTypeListView::ShowIcons(bool showIcons)
{
	if (showIcons == fShowIcons)
		return;

	fShowIcons = showIcons;

	if (Window() == NULL)
		return;

	// update items

	BFont font;
	GetFont(&font);

	for (int32 i = FullListCountItems(); i-- > 0;) {
		MimeTypeItem* item = dynamic_cast<MimeTypeItem*>(FullListItemAt(i));
		if (item == NULL)
			continue;

		if (!item->IsSupertypeOnly())
			item->ShowIcon(showIcons);

		item->Update(this, &font);
	}

	FrameResized(Bounds().Width(), Bounds().Height());
		// update scroller

	Invalidate();
}