11using System ;
2+ using AppKit ;
3+ using CoreGraphics ;
24using MonoDevelop . Ide ;
35using MonoDevelop . Ide . Gui ;
46using Xwt ;
@@ -41,9 +43,7 @@ public partial class FilterPadWidget : Widget
4143
4244 protected virtual void Build ( )
4345 {
44- this . Name = "VisualStudioMac.SolutionTreeFilter.Gui.FilterPadWidget" ;
45- HeightRequest = 130 ;
46- MinHeight = 130 ;
46+
4747 CanGetFocus = true ;
4848
4949 //BackgroundColor = Color.FromBytes(37,40,45);
@@ -60,19 +60,6 @@ protected virtual void Build()
6060 VerticalPlacement = WidgetPlacement . Center ,
6161 } ;
6262
63- //filterEntry = new TextEntry
64- //{
65- // TooltipText = "Search terms separated by space, colon, semicolon",
66- // CanGetFocus = true,
67- // ExpandHorizontal = true,
68- // HorizontalPlacement = WidgetPlacement.Fill,
69- // VerticalPlacement = WidgetPlacement.Fill,
70- // Margin = 2,
71- // MultiLine = false,
72- // PlaceholderText = "Search Terms",
73- //};
74-
75-
7663 filterClearButton = new Button ( ImageService . GetIcon ( "gtk-delete" , Gtk . IconSize . Button ) )
7764 {
7865 MarginLeft = 0 ,
@@ -86,7 +73,7 @@ protected virtual void Build()
8673 var refreshButton = new Button ( ImageService . GetIcon ( "gtk-refresh" , Gtk . IconSize . Menu ) )
8774 {
8875 MarginLeft = 0 ,
89- MarginRight = 2 ,
76+ MarginRight = 6 ,
9077 ExpandHorizontal = false ,
9178 HorizontalPlacement = WidgetPlacement . End ,
9279 VerticalPlacement = WidgetPlacement . Center ,
@@ -95,7 +82,6 @@ protected virtual void Build()
9582 } ;
9683
9784 filterHBox . PackStart ( filterLabel ) ;
98- //filterHBox.PackStart(filterEntry, true);
9985 filterHBox . PackEnd ( refreshButton ) ;
10086 filterHBox . PackEnd ( filterClearButton ) ;
10187
@@ -111,15 +97,15 @@ protected virtual void Build()
11197 MarginRight = 8 ,
11298 Sensitive = true ,
11399 MultiLine = true ,
114- PlaceholderText = "Search terms separated by space, colon or semicolon " ,
100+ PlaceholderText = "" ,
115101 } ;
116102
117103 // Expand projects section
118104 var expandHBox = new HBox ( ) ;
119105 var expandLabel = new Label ( "Projects to Expand:" )
120106 {
121- MarginLeft = 2 ,
122- MarginRight = 2 ,
107+ MarginLeft = 6 ,
108+ MarginRight = 0 ,
123109 ExpandHorizontal = false ,
124110 HorizontalPlacement = WidgetPlacement . Start ,
125111 } ;
@@ -135,13 +121,14 @@ protected virtual void Build()
135121 MarginLeft = 8 ,
136122 MarginRight = 8 ,
137123 MultiLine = false ,
138- PlaceholderText = "Project search terms "
124+ PlaceholderText = ""
139125 } ;
140126
141127 applyButton = new Button ( ImageService . GetIcon ( "gtk-refresh" ) )
142128 {
129+ TooltipText = "Apply the Project to expand" ,
143130 MarginLeft = 2 ,
144- MarginRight = 2 ,
131+ MarginRight = 6 ,
145132 ExpandHorizontal = false ,
146133 HorizontalPlacement = WidgetPlacement . End ,
147134 VerticalPlacement = WidgetPlacement . Center ,
@@ -151,21 +138,20 @@ protected virtual void Build()
151138 expandHBox . PackStart ( expandLabel ) ;
152139 expandHBox . PackEnd ( applyButton ) ;
153140
154-
155141 // Expand projects section
156142 var buttonsHBox = new HBox ( ) ;
157- pinOpenDocumentsButton = new Button ( ImageService . GetIcon ( Stock . PinDown , Gtk . IconSize . Button ) , "Pin All Open Documents in Workbench " )
143+ pinOpenDocumentsButton = new Button ( ImageService . GetIcon ( Stock . PinDown , Gtk . IconSize . Button ) , "Pin All Open Documents" )
158144 {
159- MarginLeft = 2 ,
145+ MarginLeft = 6 ,
160146 MarginRight = 2 ,
161147 ExpandHorizontal = false ,
162148 HorizontalPlacement = WidgetPlacement . Center ,
163149 } ;
164150
165- resetPinnedButton = new Button ( ImageService . GetIcon ( Stock . PinUp , Gtk . IconSize . Button ) , "Unpin All" )
151+ resetPinnedButton = new Button ( ImageService . GetIcon ( Stock . PinUp , Gtk . IconSize . Button ) , "Unpin All" )
166152 {
167153 MarginLeft = 2 ,
168- MarginRight = 2 ,
154+ MarginRight = 6 ,
169155 ExpandHorizontal = false ,
170156 HorizontalPlacement = WidgetPlacement . Center ,
171157 } ;
@@ -176,205 +162,23 @@ protected virtual void Build()
176162
177163 var mainVBox = new VBox ( ) ;
178164 mainVBox . PackStart ( filterHBox , false , false ) ;
179- mainVBox . PackStart ( filterEntry , true , true ) ;
165+ mainVBox . PackStart ( filterEntry , true , true ) ;
180166 mainVBox . PackStart ( expandHBox , false , false ) ;
181167 mainVBox . PackStart ( projectsEntry , false , true ) ;
182168 mainVBox . PackStart ( buttonsHBox , false , false ) ;
183- mainVBox . PackStart ( new FrameBox ( ) , true , true ) ;
184-
185- //mainVBox.MinHeight = 130;
186- //mainVBox.HeightRequest = 130;
187-
188- // this.label1.Name = "label1";
189- //this.hbox1.Placements.Add(new BoxPlacement() { Child = label1 });
190- //Box.BoxChild w1 = ((Box.BoxChild)(this.hbox1[this.label1]));
191- //w1.Position = 0;
192- //w1.Expand = false;
193- //w1.Fill = false;
194- //w1.Padding = ((uint)(6));
195- // Container child hbox1.Gtk.Box+BoxChild
196- //this.filterEntry = new Entry();
197- //this.filterEntry.TooltipMarkup = "Separate by space, colon, semicolon";
198- //this.filterEntry.CanFocus = true;
199- //this.filterEntry.Name = "filterEntry";
200- //this.filterEntry.IsEditable = true;
201- //this.filterEntry.HasFrame = false;
202- //this.filterEntry.InvisibleChar = '●';
203- //this.hbox1.Add(this.filterEntry);
204- //Box.BoxChild w2 = ((Box.BoxChild)(this.hbox1[this.filterEntry]));
205- //w2.Position = 2;
206- //w2.Padding = ((uint)(6));
207- //// Container child hbox1.Gtk.Box+BoxChild
208- //this.button1 = new Button();
209- //this.button1.CanFocus = true;
210- //this.button1.Name = "button1";
211- //this.button1.UseUnderline = true;
212- //this.button1.Relief = ((ReliefStyle)(1));
213- //this.button1.Label = global::Mono.Unix.Catalog.GetString("Clear");
214- //this.hbox1.Add(this.button1);
215- //Box.BoxChild w3 = ((Box.BoxChild)(this.hbox1[this.button1]));
216- //w3.PackType = ((PackType)(1));
217- //w3.Position = 3;
218- //w3.Expand = false;
219- //w3.Fill = false;
220- //w3.Padding = ((uint)(2));
221- //this.vbox1.Add(this.hbox1);
222- //Box.BoxChild w4 = ((Box.BoxChild)(this.vbox1[this.hbox1]));
223- //w4.Position = 0;
224- //w4.Expand = false;
225- //w4.Fill = false;
226- //// Container child vbox1.Gtk.Box+BoxChild
227- //this.hbox2 = new HBox();
228- //this.hbox2.Name = "hbox2";
229- //this.hbox2.Spacing = 6;
230- //// Container child hbox2.Gtk.Box+BoxChild
231- //this.oneClickCheckbutton = new CheckButton();
232- //this.oneClickCheckbutton.CanFocus = true;
233- //this.oneClickCheckbutton.Name = "oneClickCheckbutton";
234- //this.oneClickCheckbutton.Label = global::Mono.Unix.Catalog.GetString("Use one click to show file");
235- //this.oneClickCheckbutton.Active = true;
236- //this.oneClickCheckbutton.DrawIndicator = true;
237- //this.oneClickCheckbutton.UseUnderline = true;
238- //this.hbox2.Add(this.oneClickCheckbutton);
239- //Box.BoxChild w5 = ((Box.BoxChild)(this.hbox2[this.oneClickCheckbutton]));
240- //w5.Position = 0;
241- //// Container child hbox2.Gtk.Box+BoxChild
242- //this.newReleaseAvailableButton = new Button();
243- //this.newReleaseAvailableButton.CanFocus = true;
244- //this.newReleaseAvailableButton.Name = "newReleaseAvailableButton";
245- //this.newReleaseAvailableButton.UseUnderline = true;
246- //this.newReleaseAvailableButton.Relief = ((ReliefStyle)(1));
247- //this.newReleaseAvailableButton.Label = global::Mono.Unix.Catalog.GetString("A new release is available");
248- //this.hbox2.Add(this.newReleaseAvailableButton);
249- //Box.BoxChild w6 = ((Box.BoxChild)(this.hbox2[this.newReleaseAvailableButton]));
250- //w6.Position = 2;
251- //w6.Expand = false;
252- //w6.Fill = false;
253- //w6.Padding = ((uint)(2));
254- //this.vbox1.Add(this.hbox2);
255- //Box.BoxChild w7 = ((Box.BoxChild)(this.vbox1[this.hbox2]));
256- //w7.Position = 1;
257- //w7.Expand = false;
258- //w7.Fill = false;
259- //// Container child vbox1.Gtk.Box+BoxChild
260- //this.hbox3 = new HBox();
261- //this.hbox3.Name = "hbox3";
262- //this.hbox3.Spacing = 6;
263- //// Container child hbox3.Gtk.Box+BoxChild
264- //this.label2 = new Label();
265- //this.label2.Name = "label2";
266- //this.label2.LabelProp = global::Mono.Unix.Catalog.GetString("Projects to Expand");
267- //this.hbox3.Add(this.label2);
268- //Box.BoxChild w8 = ((Box.BoxChild)(this.hbox3[this.label2]));
269- //w8.Position = 0;
270- //w8.Expand = false;
271- //w8.Fill = false;
272- //w8.Padding = ((uint)(6));
273- //// Container child hbox3.Gtk.Box+BoxChild
274- //this.collapseEntry = new Entry();
275- //this.collapseEntry.TooltipMarkup = "Separate by space, colon, semicolon";
276- //this.collapseEntry.CanFocus = true;
277- //this.collapseEntry.Name = "collapseEntry";
278- //this.collapseEntry.IsEditable = true;
279- //this.collapseEntry.HasFrame = false;
280- //this.collapseEntry.InvisibleChar = '●';
281- //this.hbox3.Add(this.collapseEntry);
282- //Box.BoxChild w9 = ((Box.BoxChild)(this.hbox3[this.collapseEntry]));
283- //w9.Position = 1;
284- //w9.Padding = ((uint)(6));
285- //// Container child hbox3.Gtk.Box+BoxChild
286- //this.collapseButton = new Button();
287- //this.collapseButton.CanFocus = true;
288- //this.collapseButton.Name = "collapseButton";
289- //this.collapseButton.UseUnderline = true;
290- //this.collapseButton.FocusOnClick = false;
291- //this.collapseButton.Relief = ((ReliefStyle)(1));
292- //this.collapseButton.Label = global::Mono.Unix.Catalog.GetString("Apply");
293- //this.hbox3.Add(this.collapseButton);
294- //Box.BoxChild w10 = ((Box.BoxChild)(this.hbox3[this.collapseButton]));
295- //w10.Position = 2;
296- //w10.Expand = false;
297- //w10.Fill = false;
298- //w10.Padding = ((uint)(2));
299- //this.vbox1.Add(this.hbox3);
300- //Box.BoxChild w11 = ((Box.BoxChild)(this.vbox1[this.hbox3]));
301- //w11.Position = 3;
302- //w11.Expand = false;
303- //w11.Fill = false;
304- //// Container child vbox1.Gtk.Box+BoxChild
305- //this.hbox4 = new HBox();
306- //this.hbox4.Name = "hbox4";
307- //this.hbox4.Spacing = 6;
308- //// Container child hbox4.Gtk.Box+BoxChild
309- //this.ResetPinnedButton = new Button();
310- //this.ResetPinnedButton.CanFocus = true;
311- //this.ResetPinnedButton.Name = "ResetPinnedButton";
312- //this.ResetPinnedButton.UseUnderline = true;
313- //this.ResetPinnedButton.FocusOnClick = false;
314- //this.ResetPinnedButton.Label = global::Mono.Unix.Catalog.GetString("Reset Pinned Doc\'s");
315- //this.hbox4.Add(this.ResetPinnedButton);
316- //Box.BoxChild w12 = ((Box.BoxChild)(this.hbox4[this.ResetPinnedButton]));
317- //w12.Position = 0;
318- //w12.Expand = false;
319- //w12.Fill = false;
320- //w12.Padding = ((uint)(2));
321- //// Container child hbox4.Gtk.Box+BoxChild
322- //this.ReloadPropertiesButton = new Button();
323- //this.ReloadPropertiesButton.CanFocus = true;
324- //this.ReloadPropertiesButton.Name = "ReloadPropertiesButton";
325- //this.ReloadPropertiesButton.UseUnderline = true;
326- //this.ReloadPropertiesButton.FocusOnClick = false;
327- //this.ReloadPropertiesButton.Label = global::Mono.Unix.Catalog.GetString("Reload Properties");
328- //this.hbox4.Add(this.ReloadPropertiesButton);
329- //Box.BoxChild w13 = ((Box.BoxChild)(this.hbox4[this.ReloadPropertiesButton]));
330- //w13.Position = 2;
331- //w13.Expand = false;
332- //w13.Fill = false;
333- //w13.Padding = ((uint)(6));
334- //// Container child hbox4.Gtk.Box+BoxChild
335- //this.PinOpenDocumentsButton = new Button();
336- //this.PinOpenDocumentsButton.TooltipMarkup = "Pin all open documents in the workbench";
337- //this.PinOpenDocumentsButton.CanFocus = true;
338- //this.PinOpenDocumentsButton.Name = "PinOpenDocumentsButton";
339- //this.PinOpenDocumentsButton.UseUnderline = true;
340- //this.PinOpenDocumentsButton.FocusOnClick = false;
341- //this.PinOpenDocumentsButton.Label = global::Mono.Unix.Catalog.GetString("Pin All Open Doc\'s");
342- //this.hbox4.Add(this.PinOpenDocumentsButton);
343- //Box.BoxChild w14 = ((Box.BoxChild)(this.hbox4[this.PinOpenDocumentsButton]));
344- //w14.PackType = ((PackType)(1));
345- //w14.Position = 4;
346- //w14.Expand = false;
347- //w14.Fill = false;
348- //w14.Padding = ((uint)(2));
349- //this.vbox1.Add(this.hbox4);
350- //Box.BoxChild w15 = ((Box.BoxChild)(this.vbox1[this.hbox4]));
351- //w15.Position = 4;
352- //w15.Expand = false;
353- //w15.Fill = false;
354- //this.Add(this.vbox1);
355- //if ((this.Child != null))
356- //{
357- // this.Child.ShowAll();
358- //}
359-
360-
361- //paned = new HPaned();
362- ////var mainVBox = new VBox();
363- //label = new Label("Hello world!");
364- //paned.Panel1.Content = label;
365- Content = mainVBox ;
366-
367- //this.newReleaseAvailableButton.Hide();
368- //this.Show();
369- //this.filterEntry.Changed += new global::System.EventHandler(this.OnFilterEntryChanged);
370- //this.button1.Clicked += new global::System.EventHandler(this.clearButton_Clicked);
371- //this.oneClickCheckbutton.Toggled += new global::System.EventHandler(this.oneClickCheckbutton_Toggled);
372- //this.newReleaseAvailableButton.Clicked += new global::System.EventHandler(this.NewReleaseAvailableButton_Clicked);
373- //this.collapseButton.Clicked += new global::System.EventHandler(this.collapseButton_Clicked);
374- //this.ResetPinnedButton.Clicked += new global::System.EventHandler(this.ResetPinnedDocuments_Clicked);
375- //this.ReloadPropertiesButton.Clicked += new global::System.EventHandler(this.ReloadPropertiesButton_Clicked);
376- //this.PinOpenDocumentsButton.Clicked += new global::System.EventHandler(this.PinOpenDocuments_Clicked);
169+
170+ // Force a height
171+ var mainFrame = new FrameBox ( mainVBox ) { MinHeight = 250 } ;
172+
173+ var view = mainFrame . Surface . NativeWidget as NSView ;
174+ if ( view != null )
175+ {
176+
177+ view . SetFrameSize ( new CGSize ( 260 /*view.Frame.Size.Width*/ , 130 ) ) ;
178+ view . Identifier = "VisualStudio.SolutionTreeFilter.FilterPad.MainVBox" ;
179+ }
180+
181+ Content = mainFrame ;
377182 }
378183 }
379- }
380-
184+ }
0 commit comments