diff options
author | Cody Russell <cody@jhu.edu> | 2015-03-06 23:02:15 +0300 |
---|---|---|
committer | Cody Russell <cody@jhu.edu> | 2015-03-06 23:02:50 +0300 |
commit | 3f585935ddf8a8c22f1f8527375d98b51593858b (patch) | |
tree | 52a7cacf9432ceb9ba9768aa644639d64123cfb2 /main/src/addins/MonoDevelop.SourceEditor2 | |
parent | 645b16654a8c1819a5af0f24b1d553bd0bf79bf6 (diff) |
[Editor] Fix some visual quirks in the source editor overlay.
https://bugzilla.xamarin.com/show_bug.cgi?id=27599
Diffstat (limited to 'main/src/addins/MonoDevelop.SourceEditor2')
-rw-r--r-- | main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorWidget.cs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorWidget.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorWidget.cs index 0d9780e404..092bd6438d 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorWidget.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorWidget.cs @@ -992,7 +992,12 @@ namespace MonoDevelop.SourceEditor hbox.PackStart (label, true, true, 0); var okButton = new Button (Gtk.Stock.Ok); okButton.WidthRequest = 60; - hbox.PackEnd (okButton, false, false, 0); + + // Small amount of vertical padding for the OK button. + const int verticalPadding = 2; + var vbox = new VBox (); + vbox.PackEnd (okButton, true, true, verticalPadding); + hbox.PackEnd (vbox, false, false, 0); var list = new List<string> (); list.Add (string.Format ("Convert to {0} line endings", GetEolString (textEditor.Options.DefaultEolMarker))); @@ -1008,6 +1013,12 @@ namespace MonoDevelop.SourceEditor messageOverlayWindow.Child = container; messageOverlayWindow.ShowOverlay (this.TextEditor); + // This is hacky, but it will ensure that our combo appears with with the correct size. + GLib.Timeout.Add (100, delegate { + combo.QueueResize (); + return false; + }); + messageOverlayWindow.SizeFunc = () => { return okButton.SizeRequest ().Width + combo.SizeRequest ().Width + |