Fix the default background color reported for toplevel windows with GTK3
See #18811
This commit is contained in:
@@ -74,6 +74,7 @@ public:
|
|||||||
virtual void SetLabel(const wxString& label) wxOVERRIDE { SetTitle( label ); }
|
virtual void SetLabel(const wxString& label) wxOVERRIDE { SetTitle( label ); }
|
||||||
virtual wxString GetLabel() const wxOVERRIDE { return GetTitle(); }
|
virtual wxString GetLabel() const wxOVERRIDE { return GetTitle(); }
|
||||||
|
|
||||||
|
virtual wxVisualAttributes GetDefaultAttributes() const wxOVERRIDE;
|
||||||
|
|
||||||
virtual bool SetTransparent(wxByte alpha) wxOVERRIDE;
|
virtual bool SetTransparent(wxByte alpha) wxOVERRIDE;
|
||||||
virtual bool CanSetTransparent() wxOVERRIDE;
|
virtual bool CanSetTransparent() wxOVERRIDE;
|
||||||
|
@@ -35,6 +35,7 @@
|
|||||||
|
|
||||||
#include "wx/gtk/private.h"
|
#include "wx/gtk/private.h"
|
||||||
#include "wx/gtk/private/gtk3-compat.h"
|
#include "wx/gtk/private/gtk3-compat.h"
|
||||||
|
#include "wx/gtk/private/stylecontext.h"
|
||||||
#include "wx/gtk/private/win_gtk.h"
|
#include "wx/gtk/private/win_gtk.h"
|
||||||
|
|
||||||
#ifdef GDK_WINDOWING_X11
|
#ifdef GDK_WINDOWING_X11
|
||||||
@@ -1815,3 +1816,12 @@ bool wxTopLevelWindowGTK::CanSetTransparent()
|
|||||||
"Composite", &opcode, &event, &error);
|
"Composite", &opcode, &event, &error);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxVisualAttributes wxTopLevelWindowGTK::GetDefaultAttributes() const
|
||||||
|
{
|
||||||
|
wxVisualAttributes attrs(GetClassDefaultAttributes());
|
||||||
|
#ifdef __WXGTK3__
|
||||||
|
wxGtkStyleContext().AddWindow().Bg(attrs.colBg);
|
||||||
|
#endif
|
||||||
|
return attrs;
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user