mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-29 01:07:58 +01:00
Merge branch 'develop' into dependabot/nuget/SixLabors.ImageSharp-3.1.4
This commit is contained in:
@@ -753,13 +753,13 @@ namespace Terminal.Gui {
|
||||
/// </summary>
|
||||
WheeledDown = unchecked((int)0x20000000),
|
||||
/// <summary>
|
||||
/// Vertical button wheeled up while pressing ButtonShift.
|
||||
/// Vertical button wheeled up while pressing ButtonCtrl.
|
||||
/// </summary>
|
||||
WheeledLeft = ButtonShift | WheeledUp,
|
||||
WheeledLeft = ButtonCtrl | WheeledUp,
|
||||
/// <summary>
|
||||
/// Vertical button wheeled down while pressing ButtonShift.
|
||||
/// Vertical button wheeled down while pressing ButtonCtrl.
|
||||
/// </summary>
|
||||
WheeledRight = ButtonShift | WheeledDown,
|
||||
WheeledRight = ButtonCtrl | WheeledDown,
|
||||
/// <summary>
|
||||
/// Mask that captures all the events.
|
||||
/// </summary>
|
||||
|
||||
@@ -864,7 +864,8 @@ namespace Terminal.Gui {
|
||||
|
||||
void RenderUstr (ConsoleDriver driver, ustring ustr, int col, int line, int width, int start = 0)
|
||||
{
|
||||
var u = TextFormatter.ClipAndJustify (ustr, width + start, TextAlignment.Left);
|
||||
ustring str = start > ustr.ConsoleWidth ? string.Empty : ustr.Substring (Math.Min (start, ustr.ToRunes ().Length - 1));
|
||||
ustring u = TextFormatter.ClipAndJustify (str, width, TextAlignment.Left);
|
||||
driver.AddStr (u);
|
||||
width -= TextFormatter.GetTextWidth (u);
|
||||
while (width-- + start > 0) {
|
||||
@@ -876,7 +877,7 @@ namespace Terminal.Gui {
|
||||
public void Render (ListView container, ConsoleDriver driver, bool marked, int item, int col, int line, int width, int start = 0)
|
||||
{
|
||||
var savedClip = container.ClipToBounds ();
|
||||
container.Move (col - start, line);
|
||||
container.Move (Math.Max (col - start, 0), line);
|
||||
var t = src? [item];
|
||||
if (t == null) {
|
||||
RenderUstr (driver, ustring.Make (""), col, line, width);
|
||||
|
||||
@@ -79,9 +79,9 @@ namespace UICatalog.Scenarios {
|
||||
};
|
||||
|
||||
_listView.DrawContent += (e) => {
|
||||
_scrollBar.Size = _listView.Source.Count - 1;
|
||||
_scrollBar.Size = _listView.Source.Count;
|
||||
_scrollBar.Position = _listView.TopItem;
|
||||
_scrollBar.OtherScrollBarView.Size = _listView.Maxlength - 1;
|
||||
_scrollBar.OtherScrollBarView.Size = _listView.Maxlength;
|
||||
_scrollBar.OtherScrollBarView.Position = _listView.LeftItem;
|
||||
_scrollBar.Refresh ();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user