mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-23 01:55:30 +00:00
Merge pull request #1 from Blquinn/source-buffer
Update SourceView to return SourceView.Buffer
This commit is contained in:
commit
e6aed8d93d
12
Source/Libs/SourceView/SourceView.cs
Normal file
12
Source/Libs/SourceView/SourceView.cs
Normal file
|
@ -0,0 +1,12 @@
|
|||
namespace GtkSource
|
||||
{
|
||||
public partial class SourceView : Gtk.TextView
|
||||
{
|
||||
new public GtkSource.Buffer Buffer
|
||||
{
|
||||
get => base.Buffer as GtkSource.Buffer;
|
||||
set => base.Buffer = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -59,6 +59,7 @@ namespace Samples
|
|||
|
||||
_textViewCode = new SourceView();
|
||||
_textViewCode.ShowLineNumbers = true;
|
||||
_textViewCode.Buffer.Language = new LanguageManager().GetLanguage("c-sharp");
|
||||
|
||||
_textViewCode.Margin = 3;
|
||||
scroll2.Child = _textViewCode;
|
||||
|
@ -147,4 +148,4 @@ namespace Samples
|
|||
_treeView.ExpandAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue