void MacDecorator::_SetTitle(const char* string, BRegion* updateRegion) { // TODO: we could be much smarter about the update region BRect rect = TabRect(); _DoLayout(); if (updateRegion == NULL) return; rect = rect | TabRect(); rect.bottom++; // the border will look differently when the title is adjacent updateRegion->Include(rect); }
void WinDecorator::_SetTitle(Decorator::Tab* tab, const char* string, BRegion* updateRegion) { // TODO we could be much smarter about the update region BRect rect = TabRect(tab); if (updateRegion == NULL) return; BRect updatedRect = TabRect(tab); if (rect.left > updatedRect.left) rect.left = updatedRect.left; if (rect.right < updatedRect.right) rect.right = updatedRect.right; updateRegion->Include(rect); }