Avoid blank menubar/toolbar when using wx[MT]B_DOCKABLE with GTK+ 3.20
A GTK+ bug involving GtkHandleBox somehow prevents drawing of its child since 3.19.7. Avoid this by disabling the docking functionality, which is preferable to having the bar be blank. See #17539
This commit is contained in:
@@ -120,7 +120,12 @@ void wxMenuBar::Init(size_t n, wxMenu *menus[], const wxString titles[], long st
|
|||||||
|
|
||||||
m_menubar = gtk_menu_bar_new();
|
m_menubar = gtk_menu_bar_new();
|
||||||
|
|
||||||
if (style & wxMB_DOCKABLE)
|
if ((style & wxMB_DOCKABLE)
|
||||||
|
#ifdef __WXGTK3__
|
||||||
|
// using GtkHandleBox prevents menubar from drawing with GTK+ >= 3.19.7
|
||||||
|
&& gtk_check_version(3,19,7)
|
||||||
|
#endif
|
||||||
|
)
|
||||||
{
|
{
|
||||||
m_widget = gtk_handle_box_new();
|
m_widget = gtk_handle_box_new();
|
||||||
gtk_container_add(GTK_CONTAINER(m_widget), m_menubar);
|
gtk_container_add(GTK_CONTAINER(m_widget), m_menubar);
|
||||||
|
@@ -386,7 +386,12 @@ bool wxToolBar::Create( wxWindow *parent,
|
|||||||
#endif
|
#endif
|
||||||
GtkSetStyle();
|
GtkSetStyle();
|
||||||
|
|
||||||
if (style & wxTB_DOCKABLE)
|
if ((style & wxTB_DOCKABLE)
|
||||||
|
#ifdef __WXGTK3__
|
||||||
|
// using GtkHandleBox prevents toolbar from drawing with GTK+ >= 3.19.7
|
||||||
|
&& gtk_check_version(3,19,7)
|
||||||
|
#endif
|
||||||
|
)
|
||||||
{
|
{
|
||||||
m_widget = gtk_handle_box_new();
|
m_widget = gtk_handle_box_new();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user