mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-30 17:48:36 +02:00
Changed sample project to show line numbers in sourceview
Just to make it a bit more obvious that the widget is a SourceView and not a TextView.
This commit is contained in:
parent
27125e5984
commit
6d3c0cf744
@ -16,7 +16,7 @@ namespace Samples
|
|||||||
private Box _boxContent;
|
private Box _boxContent;
|
||||||
private TreeStore _store;
|
private TreeStore _store;
|
||||||
private Dictionary<string, (Type type, Widget widget)> _items;
|
private Dictionary<string, (Type type, Widget widget)> _items;
|
||||||
private TextView _textViewCode;
|
private SourceView _textViewCode;
|
||||||
private Notebook _notebook;
|
private Notebook _notebook;
|
||||||
|
|
||||||
public MainWindow() : base(WindowType.Toplevel)
|
public MainWindow() : base(WindowType.Toplevel)
|
||||||
@ -56,7 +56,10 @@ namespace Samples
|
|||||||
_notebook.AppendPage(scroll1, new Label { Text = "Data", Expand = true });
|
_notebook.AppendPage(scroll1, new Label { Text = "Data", Expand = true });
|
||||||
|
|
||||||
var scroll2 = new ScrolledWindow();
|
var scroll2 = new ScrolledWindow();
|
||||||
|
|
||||||
_textViewCode = new SourceView();
|
_textViewCode = new SourceView();
|
||||||
|
_textViewCode.ShowLineNumbers = true;
|
||||||
|
|
||||||
_textViewCode.Margin = 3;
|
_textViewCode.Margin = 3;
|
||||||
scroll2.Child = _textViewCode;
|
scroll2.Child = _textViewCode;
|
||||||
_notebook.AppendPage(scroll2, new Label { Text = "Code", Expand = true });
|
_notebook.AppendPage(scroll2, new Label { Text = "Code", Expand = true });
|
||||||
|
Loading…
Reference in New Issue
Block a user