Flush the bitmap caches for the zoom and close button, when their hightlight
changes. Fixes that the buttons were not drawn with the right color when the S&T tab highlight was active. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39648 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -242,6 +242,29 @@ DefaultDecorator::RegionAt(BPoint where) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
DefaultDecorator::SetRegionHighlight(Region region, uint8 highlight,
|
||||||
|
BRegion* dirty)
|
||||||
|
{
|
||||||
|
// Invalidate the bitmap caches for the close/zoom button, when the
|
||||||
|
// highlight changes.
|
||||||
|
switch (region) {
|
||||||
|
case REGION_CLOSE_BUTTON:
|
||||||
|
if (highlight != RegionHighlight(region))
|
||||||
|
memset(&fCloseBitmaps, 0, sizeof(fCloseBitmaps));
|
||||||
|
break;
|
||||||
|
case REGION_ZOOM_BUTTON:
|
||||||
|
if (highlight != RegionHighlight(region))
|
||||||
|
memset(&fZoomBitmaps, 0, sizeof(fZoomBitmaps));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Decorator::SetRegionHighlight(region, highlight, dirty);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
DefaultDecorator::ExtendDirtyRegion(Region region, BRegion& dirty)
|
DefaultDecorator::ExtendDirtyRegion(Region region, BRegion& dirty)
|
||||||
{
|
{
|
||||||
@@ -1500,7 +1523,6 @@ DefaultDecorator::_GetBitmapForButton(Component item, bool down, int32 width,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
DefaultDecorator::_GetComponentColors(Component component,
|
DefaultDecorator::_GetComponentColors(Component component,
|
||||||
ComponentColors _colors)
|
ComponentColors _colors)
|
||||||
|
|||||||
@@ -40,6 +40,9 @@ public:
|
|||||||
|
|
||||||
virtual Region RegionAt(BPoint where) const;
|
virtual Region RegionAt(BPoint where) const;
|
||||||
|
|
||||||
|
virtual bool SetRegionHighlight(Region region,
|
||||||
|
uint8 highlight, BRegion* dirty);
|
||||||
|
|
||||||
virtual void ExtendDirtyRegion(Region region,
|
virtual void ExtendDirtyRegion(Region region,
|
||||||
BRegion& dirty);
|
BRegion& dirty);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user