From 69c552cf9d596296f4158f52c05e0808729fe704 Mon Sep 17 00:00:00 2001 From: alcexhim Date: Thu, 10 Jul 2014 00:39:10 -0400 Subject: [PATCH] Better-looking tabbed document interface (still needs work though) --- .../GTK/UniversalEditor.Engines.GTK/MainWindow.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/CSharp/Engines/GTK/UniversalEditor.Engines.GTK/MainWindow.cs b/CSharp/Engines/GTK/UniversalEditor.Engines.GTK/MainWindow.cs index e4fa99c0..7b760f7f 100644 --- a/CSharp/Engines/GTK/UniversalEditor.Engines.GTK/MainWindow.cs +++ b/CSharp/Engines/GTK/UniversalEditor.Engines.GTK/MainWindow.cs @@ -248,7 +248,20 @@ namespace UniversalEditor.Engines.GTK tabLabel.LabelProp = tabTitle; } tabLabel.TooltipText = tabTitle; - tbsDocumentTabs.InsertPage(child, tabLabel, -1); + + Button btnClose = new Button(); + btnClose.Image = new Image("gtk-close", IconSize.Menu); + btnClose.Relief = ReliefStyle.None; + + Image imgIcon = new Image("gtk-new", IconSize.Menu); + + HBox hboxLabelAndCloseButton = new HBox(); + hboxLabelAndCloseButton.PackStart (imgIcon, false, false, 0); + hboxLabelAndCloseButton.PackStart (tabLabel, true, true, 0); + hboxLabelAndCloseButton.PackEnd (btnClose, false, false, 0); + hboxLabelAndCloseButton.ShowAll (); + + tbsDocumentTabs.InsertPage(child, hboxLabelAndCloseButton, -1); tbsDocumentTabs.Page = tbsDocumentTabs.NPages - 1; tbsDocumentTabs.ShowAll (); }