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