Skip to content
This repository was archived by the owner on Oct 4, 2021. It is now read-only.

Commit 8de3648

Browse files
committed
[NuGet] Improve license file dialog
1. Fix button label so it reads OK instead of Ok 2. Show license file text in scroll view. 3. Adding scroll view gives the text a one pixel border. 4. Make text view read-only.
1 parent e26b14b commit 8de3648

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Gui/LicenseFileDialog.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2525
// THE SOFTWARE.
2626

27-
using System;
28-
using System.Collections.Generic;
2927
using System.ComponentModel;
3028
using NuGet.PackageManagement.UI;
3129
using Xwt;
@@ -55,11 +53,16 @@ void Build ()
5553
Width = 450;
5654
Title = licenseFileText.LicenseHeader;
5755

56+
var scrollView = new ScrollView ();
57+
Content = scrollView;
58+
5859
textView = new RichTextView ();
59-
Content = textView;
60+
textView.ReadOnly = true;
61+
scrollView.Content = textView;
6062

61-
Buttons.Add (Command.Ok);
62-
DefaultCommand = Command.Ok;
63+
var okCommand = new Command ("Ok", Core.GettextCatalog.GetString ("OK"));
64+
Buttons.Add ();
65+
DefaultCommand = okCommand;
6366
}
6467

6568
void LicenseFileTextPropertyChanged (object sender, PropertyChangedEventArgs e)

0 commit comments

Comments
 (0)