// Map primary saturation from [0, 1] to [.25, .75]
bool primary_is_gray = false;
- const float gray_saturation_threshold = 0.01;
+ static const double gray_saturation_threshold = 0.01;
if(primary_hsl.saturation <= gray_saturation_threshold)
primary_is_gray = true;
else
if(m_flags & wxRIBBON_BAR_SHOW_PAGE_ICONS)
{
wxBitmap icon = tab.page->GetIcon();
+ if(icon.IsOk())
+ {
int x = tab.rect.x + 4;
if((m_flags & wxRIBBON_BAR_SHOW_PAGE_LABELS) == 0)
x = tab.rect.x + (tab.rect.width - icon.GetWidth()) / 2;
dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 -
icon.GetHeight()) / 2, true);
+ }
}
if(m_flags & wxRIBBON_BAR_SHOW_PAGE_LABELS)
{