public ErrorListDialog() : base(Catalog.GetString("Error")) { var table = new Table(3, 2, false) { RowSpacing = 12, ColumnSpacing = 16 }; table.Attach(icon_image = new Image() { IconName = "dialog-error", IconSize = (int)IconSize.Dialog, Yalign = 0.0f }, 0, 1, 0, 3, AttachOptions.Shrink, AttachOptions.Fill | AttachOptions.Expand, 0, 0); table.Attach(header_label = new Label() { Xalign = 0.0f }, 1, 2, 0, 1, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Shrink, 0, 0); table.Attach(message_label = new Hyena.Widgets.WrapLabel(), 1, 2, 1, 2, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Shrink, 0, 0); var scrolled_window = new ScrolledWindow() { HscrollbarPolicy = PolicyType.Automatic, VscrollbarPolicy = PolicyType.Automatic, ShadowType = ShadowType.In }; list_view = new TreeView() { HeightRequest = 120, WidthRequest = 200 }; scrolled_window.Add(list_view); table.Attach(details_expander = new Expander(Catalog.GetString("Details")), 1, 2, 2, 3, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Fill | AttachOptions.Expand, 0, 0); details_expander.Add(scrolled_window); VBox.PackStart(table, true, true, 0); VBox.Spacing = 12; VBox.ShowAll(); details_expander.Activated += OnConfigureGeometry; Realized += OnConfigureGeometry; }
public ErrorListDialog() : base(Catalog.GetString ("Error")) { var table = new Table (3, 2, false) { RowSpacing = 12, ColumnSpacing = 16 }; table.Attach (icon_image = new Image () { IconName = "dialog-error", IconSize = (int)IconSize.Dialog, Yalign = 0.0f }, 0, 1, 0, 3, AttachOptions.Shrink, AttachOptions.Fill | AttachOptions.Expand, 0, 0); table.Attach (header_label = new Label () { Xalign = 0.0f }, 1, 2, 0, 1, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Shrink, 0, 0); table.Attach (message_label = new Hyena.Widgets.WrapLabel (), 1, 2, 1, 2, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Shrink, 0, 0); var scrolled_window = new ScrolledWindow () { HscrollbarPolicy = PolicyType.Automatic, VscrollbarPolicy = PolicyType.Automatic, ShadowType = ShadowType.In }; list_view = new TreeView () { HeightRequest = 120, WidthRequest = 200 }; scrolled_window.Add (list_view); table.Attach (details_expander = new Expander (Catalog.GetString ("Details")), 1, 2, 2, 3, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Fill | AttachOptions.Expand, 0, 0); details_expander.Add (scrolled_window); VBox.PackStart (table, true, true, 0); VBox.Spacing = 12; VBox.ShowAll (); details_expander.Activated += OnConfigureGeometry; Realized += OnConfigureGeometry; }
private void BuildUI() { // The BorderWidth situation here is a bit nuts b/c the // ActionArea's is set to 5. So we work everything else out // so it all totals to 12. // // WIDGET BorderWidth // Dialog 5 // VBox 2 // inner_vbox 5 => total = 12 // ActionArea 5 => total = 12 BorderWidth = 5; base.VBox.BorderWidth = 0; // This spacing is 2 b/c the inner_vbox and ActionArea should be // 12 apart, and they already have BorderWidth 5 each base.VBox.Spacing = 2; inner_vbox = new VBox () { Spacing = 12, BorderWidth = 5, Visible = true }; base.VBox.PackStart (inner_vbox, true, true, 0); Visible = false; HasSeparator = false; var table = new Table (3, 2, false) { RowSpacing = 12, ColumnSpacing = 16 }; table.Attach (new Image () { IconName = "dialog-error", IconSize = (int)IconSize.Dialog, Yalign = 0.0f }, 0, 1, 0, 3, AttachOptions.Shrink, AttachOptions.Fill | AttachOptions.Expand, 0, 0); table.Attach (header_label = new Label () { Xalign = 0.0f }, 1, 2, 0, 1, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Shrink, 0, 0); table.Attach (message_label = new Hyena.Widgets.WrapLabel (), 1, 2, 1, 2, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Shrink, 0, 0); var scrolled_window = new ScrolledWindow () { HscrollbarPolicy = PolicyType.Automatic, VscrollbarPolicy = PolicyType.Automatic, ShadowType = ShadowType.In }; list_view = new TreeView () { HeightRequest = 120, WidthRequest = 200 }; scrolled_window.Add (list_view); table.Attach (details_expander = new Expander (Catalog.GetString ("Details")), 1, 2, 2, 3, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Fill | AttachOptions.Expand, 0, 0); details_expander.Add (scrolled_window); VBox.PackStart (table, true, true, 0); VBox.Spacing = 12; VBox.ShowAll (); accel_group = new AccelGroup (); AddAccelGroup (accel_group); Button button = new Button (Stock.Close); button.CanDefault = true; button.UseStock = true; button.Show (); button.Clicked += (o, a) => { Destroy (); }; AddActionWidget (button, ResponseType.Close); DefaultResponse = ResponseType.Close; button.AddAccelerator ("activate", accel_group, (uint)Gdk.Key.Return, 0, AccelFlags.Visible); }
private void BuildUI() { // The BorderWidth situation here is a bit nuts b/c the // ActionArea's is set to 5. So we work everything else out // so it all totals to 12. // // WIDGET BorderWidth // Dialog 5 // VBox 2 // inner_vbox 5 => total = 12 // ActionArea 5 => total = 12 BorderWidth = 5; base.VBox.BorderWidth = 0; // This spacing is 2 b/c the inner_vbox and ActionArea should be // 12 apart, and they already have BorderWidth 5 each base.VBox.Spacing = 2; inner_vbox = new VBox() { Spacing = 12, BorderWidth = 5, Visible = true }; base.VBox.PackStart(inner_vbox, true, true, 0); Visible = false; HasSeparator = false; var table = new Table(3, 2, false) { RowSpacing = 12, ColumnSpacing = 16 }; table.Attach(new Image() { IconName = "dialog-error", IconSize = (int)IconSize.Dialog, Yalign = 0.0f }, 0, 1, 0, 3, AttachOptions.Shrink, AttachOptions.Fill | AttachOptions.Expand, 0, 0); table.Attach(header_label = new Label() { Xalign = 0.0f }, 1, 2, 0, 1, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Shrink, 0, 0); table.Attach(message_label = new Hyena.Widgets.WrapLabel(), 1, 2, 1, 2, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Shrink, 0, 0); var scrolled_window = new ScrolledWindow() { HscrollbarPolicy = PolicyType.Automatic, VscrollbarPolicy = PolicyType.Automatic, ShadowType = ShadowType.In }; list_view = new TreeView() { HeightRequest = 120, WidthRequest = 200 }; scrolled_window.Add(list_view); table.Attach(details_expander = new Expander(Catalog.GetString("Details")), 1, 2, 2, 3, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Fill | AttachOptions.Expand, 0, 0); details_expander.Add(scrolled_window); VBox.PackStart(table, true, true, 0); VBox.Spacing = 12; VBox.ShowAll(); accel_group = new AccelGroup(); AddAccelGroup(accel_group); Button button = new Button(Stock.Close); button.CanDefault = true; button.UseStock = true; button.Show(); button.Clicked += (o, a) => { Destroy(); }; AddActionWidget(button, ResponseType.Close); DefaultResponse = ResponseType.Close; button.AddAccelerator("activate", accel_group, (uint)Gdk.Key.Return, 0, AccelFlags.Visible); }