1. more accurate conversion from 8-bit wx color to 16-bit GDK color
2. eliminate possiblity of wxColour RGB values changing depending on colormap 3. don't allow non-const pointer access to internal GdkColor git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -104,7 +104,7 @@ static void wxGtkTextApplyTagsFromAttr(GtkTextBuffer *text_buffer,
|
||||
|
||||
if (attr.HasTextColour())
|
||||
{
|
||||
GdkColor *colFg = attr.GetTextColour().GetColor();
|
||||
const GdkColor *colFg = attr.GetTextColour().GetColor();
|
||||
g_snprintf(buf, sizeof(buf), "WXFORECOLOR %d %d %d",
|
||||
colFg->red, colFg->green, colFg->blue);
|
||||
tag = gtk_text_tag_table_lookup( gtk_text_buffer_get_tag_table( text_buffer ),
|
||||
@@ -117,7 +117,7 @@ static void wxGtkTextApplyTagsFromAttr(GtkTextBuffer *text_buffer,
|
||||
|
||||
if (attr.HasBackgroundColour())
|
||||
{
|
||||
GdkColor *colBg = attr.GetBackgroundColour().GetColor();
|
||||
const GdkColor *colBg = attr.GetBackgroundColour().GetColor();
|
||||
g_snprintf(buf, sizeof(buf), "WXBACKCOLOR %d %d %d",
|
||||
colBg->red, colBg->green, colBg->blue);
|
||||
tag = gtk_text_tag_table_lookup( gtk_text_buffer_get_tag_table( text_buffer ),
|
||||
|
Reference in New Issue
Block a user