m_colBtnText,
m_colMenuItemHighlight,
m_colTooltip,
- m_colTooltipText;
+ m_colTooltipText,
+ m_colMenubarBg;
wxFont m_fontSystem;
};
gs_objects.m_colMenuItemHighlight = wxColour();
gs_objects.m_colTooltip = wxColour();
gs_objects.m_colTooltipText = wxColour();
+ gs_objects.m_colMenubarBg = wxColour();
gs_objects.m_fontSystem = wxNullFont;
}
wxGTK_BUTTON,
wxGTK_LIST,
wxGTK_MENUITEM,
- wxGTK_TEXTCTRL
+ wxGTK_TEXTCTRL,
+ wxGTK_MENUBAR,
};
// the colour we need
case wxGTK_MENUITEM:
widget = gtk_menu_item_new();
+
+ case wxGTK_MENUBAR:
+ widget = gtk_menu_bar_new();
+ break;
+
}
GtkStyle *def = gtk_rc_get_style( widget );
case wxSYS_COLOUR_ACTIVEBORDER:
case wxSYS_COLOUR_INACTIVEBORDER:
case wxSYS_COLOUR_BTNFACE:
- case wxSYS_COLOUR_MENUBAR:
case wxSYS_COLOUR_3DLIGHT:
if (!gs_objects.m_colBtnFace.Ok())
{
color = gs_objects.m_colWindow;
break;
+
+ case wxSYS_COLOUR_MENUBAR:
+ if (!gs_objects.m_colMenubarBg.Ok())
+ {
+ gdkColor.red =
+ gdkColor.green = 0;
+ gdkColor.blue = 0x9c40;
+ GetColourFromGTKWidget(gdkColor,wxGTK_MENUBAR);
+ gs_objects.m_colMenubarBg = wxColor(gdkColor);
+ }
+ color = gs_objects.m_colMenubarBg;
+ break;
+
case wxSYS_COLOUR_3DDKSHADOW:
color = *wxBLACK;
break;
Atom type;
int format;
gulong nitems, bytes_after;
- long* data = NULL;
+ guchar* data;
success = XGetWindowProperty(
gdk_x11_drawable_get_xdisplay(window),
gdk_x11_drawable_get_xid(window),
0, 4,
false,
XA_CARDINAL,
- &type, &format, &nitems, &bytes_after, (guchar**)&data
+ &type, &format, &nitems, &bytes_after, &data
) == Success;
if (success)
{
success = data && nitems == 4;
if (success)
{
- if (left) *left = int(data[0]);
- if (right) *right = int(data[1]);
- if (top) *top = int(data[2]);
- if (bottom) *bottom = int(data[3]);
+ long* p = (long*)data;
+ if (left) *left = int(p[0]);
+ if (right) *right = int(p[1]);
+ if (top) *top = int(p[2]);
+ if (bottom) *bottom = int(p[3]);
}
if (data)
XFree(data);