Color cubes now get created on 8-bit true-color

visual as well. (This exists).
  Added MakeModal() to wxFrame.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-05-27 19:54:05 +00:00
parent 00a395425c
commit ca26177c30
7 changed files with 67 additions and 4 deletions

View File

@@ -343,7 +343,7 @@ bool wxApp::OnInitGui()
int index = -1;
GdkColor *colors = cmap->colors;
if(colors)
if (colors)
{
int max = 3 * 65536;
@@ -359,7 +359,16 @@ bool wxApp::OnInitGui()
}
}
}
else
{
/* assume 8-bit true or static colors. this really
exists. */
GdkVisual* vis = gdk_colormap_get_visual( cmap );
index = (r >> (5 - vis->red_prec)) << vis->red_shift;
index |= (g >> (5 - vis->green_prec)) << vis->green_shift;
index |= (b >> (5 - vis->blue_prec)) << vis->blue_shift;
}
m_colorCube[ (r*1024) + (g*32) + b ] = index;
}
}