Open directhex opened 6 years ago
using System; using Xwt; class xwt3test { [STAThread] static void Main () { Application.Initialize("Xwt.GtkBackend.GtkEngine, Xwt.Gtk3, Version=1.0.0.0"); var mainWindow = new Gtk.Window("Xwt/Gtk Demo Application") { Title = "Xwt Demo Application", WidthRequest = 500, HeightRequest = 400 }; Gtk.VBox vbox1 = new Gtk.VBox(); Xwt.VBox infoBox = new Xwt.VBox() { CanGetFocus = false }; Xwt.FrameBox mbox = new Xwt.FrameBox(infoBox) { CanGetFocus = false }; vbox1.PackStart((Gtk.Widget)Xwt.Toolkit.CurrentEngine.GetNativeWidget(mbox), false, false, 0); infoBox.PackStart(new Label("test1")); infoBox.PackStart(new Label("test2")); infoBox.PackStart(new Label("test3")); infoBox.PackStart(new Label("test4")); infoBox.PackStart(new Label("test5")); mainWindow.Add(vbox1); mainWindow.ShowAll(); Application.Run(); mainWindow.Dispose(); } }
Results in:
A pure Xwt approach is fine, i.e.
using System; using Xwt; class xwt3test { [STAThread] static void Main () { Application.Initialize("Xwt.GtkBackend.GtkEngine, Xwt.Gtk3, Version=1.0.0.0"); var mainWindow = new Window() { Title = "Xwt Demo Application", Width = 500, Height = 400 }; Xwt.VBox infoBox = new Xwt.VBox() { CanGetFocus = false }; Xwt.FrameBox mbox = new Xwt.FrameBox(infoBox) { CanGetFocus = false }; infoBox.PackStart(new Label("test1")); infoBox.PackStart(new Label("test2")); infoBox.PackStart(new Label("test3")); infoBox.PackStart(new Label("test4")); infoBox.PackStart(new Label("test5")); mainWindow.Content = mbox; mainWindow.Show(); Application.Run(); mainWindow.Dispose(); } }
leads to
This is why the text in Help/About in MonoDevelop-Gtk3 is broken.
It's the Xwt.FrameBox - putting the Xwt.VBox directly into the Gtk.VBox is fine, putting the Xwt.FrameBox containing the Xwt.VBox into the Gtk.VBox causes the compression issue above.
Results in:
A pure Xwt approach is fine, i.e.
leads to
This is why the text in Help/About in MonoDevelop-Gtk3 is broken.