diff --git a/Samples/Samples/ExpanderSample.cs b/Samples/Samples/ExpanderSample.cs index b12e9d94..8680f35c 100644 --- a/Samples/Samples/ExpanderSample.cs +++ b/Samples/Samples/ExpanderSample.cs @@ -25,6 +25,7 @@ // THE SOFTWARE. using System; using Xwt; +using Xwt.Drawing; namespace Samples { @@ -39,6 +40,7 @@ namespace Samples var content = new VBox (); content.PackStart (new Label () { Text = "Label 1" }); content.PackStart (new Button () { Label = "Button 2" }); + content.BackgroundColor = Colors.Gray; expander.Content = content; PackStart (expander); } diff --git a/Xwt.Gtk/Xwt.GtkBackend/WidgetBackend.cs b/Xwt.Gtk/Xwt.GtkBackend/WidgetBackend.cs index 3cf48d11..78fbd047 100755 --- a/Xwt.Gtk/Xwt.GtkBackend/WidgetBackend.cs +++ b/Xwt.Gtk/Xwt.GtkBackend/WidgetBackend.cs @@ -367,7 +367,8 @@ namespace Xwt.GtkBackend } set { customBackgroundColor = value; - Widget.ModifyBg (Gtk.StateType.Normal, Util.ToGdkColor (value)); + AllocEventBox (); + EventsRootWidget.ModifyBg (Gtk.StateType.Normal, Util.ToGdkColor (value)); } }