Commit Graph

2828 Commits

Author SHA1 Message Date
Tig Kindel
cbb7b9fe64 Fixes #1991 - Broken link in README (#2021) 2022-09-16 07:24:59 -07:00
BDisp
0f9abea9e4 Fixes #2017. Sometimes I get fails with the TestAddManyTimeouts unit test. (#2018)
* Fixes #2017. Sometimes I get fails with the TestAddManyTimeouts unit test.

* Fixes #2013. Starting having MainLoopTests.InvokeLeakTest failure.
2022-09-16 07:09:41 -07:00
BDisp
7ce2109a46 Fixes #2013. Starting having MainLoopTests.InvokeLeakTest failure. (#2016) 2022-09-16 06:05:10 -07:00
Charlie Kindel
d7e5996449 Merge branch 'develop' of tig:migueldeicaza/gui.cs into develop 2022-09-16 06:53:58 -06:00
Tig Kindel
7a48424924 Docfx - revert hack for 1874 (#1955)
* Fixes #1874 (again)

* Fixes #1874 - Requires use docfx >= v2.59.4
2022-09-16 05:52:26 -07:00
Charlie Kindel
1dec5fae2a Merge branch 'develop' of tig:migueldeicaza/gui.cs into develop 2022-09-15 07:47:28 -06:00
BDisp
28718e9c3c Fixes #2002. Added feature to fill the remaining width with spaces. (#2003)
* Added feature to fill the remaining width with spaces.

* Removing unnecessary parameter.

* Fixes a typo.

* Unit test rewritten to explain better main feature of this PR.

Co-authored-by: Tig Kindel <tig@users.noreply.github.com>
2022-09-15 06:47:12 -07:00
BDisp
5684816601 Fixes #2011. Wizard no longer needs to set specific colors, because #1971 has been fixed. (#2012)
* Removing TextView ColorScheme from the Wizard component.

* Changing someText color to be different from the help text color.
2022-09-15 06:43:28 -07:00
BDisp
09f005448e Fixes #1800. TextView now uses the same colors as TextField. (#1971)
* Fixes #1800. TextView now uses the same colors as TextField.

* Replacing the textview to default in some scenarios.

* Removing TextView ColorScheme from the Wizard component.

* Changing someText color to be different from the help text color.

* Renamed some color methods as requested.

Co-authored-by: Tig Kindel <tig@users.noreply.github.com>
2022-09-15 06:43:18 -07:00
BDisp
d70966a29c Fixes the justified text not adding the extra spaces. (#2005)
Co-authored-by: Tig Kindel <tig@users.noreply.github.com>
2022-09-14 19:18:41 -07:00
Charlie Kindel
9259a9b995 Merge branch 'develop' of tig:migueldeicaza/gui.cs into develop 2022-09-14 19:27:33 -06:00
montekarlos
1cdf6a1b45 Fixes #1994. BREAKING CHANGE. Ensure only a single IdleHandlers list can exist. (#1997)
* Add unit test that demonstrates the loss of idle handlers added via Application.MainLoop.Invoke

* Fixes #1994. Ensure that only a single idle handlers list exists at one time

* Previous implementation locked on idleHandlers but this is dangerous because it is reallocated. It was therefore possible for two different threads to hold locks on two different instances of idleHandlers simultaneously. The idle handlers added to the older instance of idleHandlers would then be lost. This was particularity catastrophic when combined with async/await continuations being lost.

* Add dedicated lock object idleHandlersLock and use when modifying idleHandlers

* Fix additional bug in RemoveIdle that was locking the token instead of idleHandlers

* Return a copy via the IdleHandlers property as it was directly returning idleHandlers. This cannot safely be done without first acquiring idleHandlersLock

* Address code review feedback for #1994: Make IdleHandler immutable via ReadOnlyCollection

* Address code review feedback for #1994: Avoid the possibility of IdleHandlers changing while being used

Co-authored-by: Karl Janke <karl.janke@groundprobe.com>
Co-authored-by: Tig Kindel <tig@users.noreply.github.com>
2022-09-14 18:26:19 -07:00
BDisp
dfafd649c1 Fixed '_functionTimer' not be disposed after quit if it's running. (#2007) 2022-09-14 18:24:47 -07:00
BDisp
75c0160d96 Fixes #1999. Prevents the mouseGrabView being executed with a null view. (#2000)
* Unit test that will fail without the fix.

* ScrollView must return true after ungrab the mouse to allow the View property run after returned.

* Fixes #1999. Prevents the mouseGrabView being executed with a null view.

* Added one more assert null check.
2022-09-14 18:18:00 -07:00
dependabot[bot]
c983c2e65a Bump ReportGenerator from 5.1.9 to 5.1.10 (#1996)
Bumps [ReportGenerator](https://github.com/danielpalme/ReportGenerator) from 5.1.9 to 5.1.10.
- [Release notes](https://github.com/danielpalme/ReportGenerator/releases)
- [Commits](https://github.com/danielpalme/ReportGenerator/compare/v5.1.9...v5.1.10)

---
updated-dependencies:
- dependency-name: ReportGenerator
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-14 18:11:23 -07:00
BDisp
ff1eb9bea1 Fixes #1979. MessageBox.Query not wrapping since 1.7.1 (#1995)
* Added MaxWidthLine into the TextFormatter class.

* Some more test line to better verifying the mainloop idle handlers.

* Fixes #1979. MessageBox.Query not wrapping since 1.7.1

* Added MessageBox unit tests.

* States a button centered issue on a lower fixed size.

* Fixed the centered button issue 4d0a4b6.
2022-09-14 18:11:12 -07:00
BDisp
b21f203292 Fixes #820. Added HideDropdownListOnClick property. (#1983)
* Added HideDropdownListOnClick property.

* Invoking OpenSelectedItem on click.

* Added one more constructor and more unit tests.

* Added the ComboListView derived class.

* Added more features to ComboBox.

* Removes code not featured yet.

* Added HideDropdownListOnClick property to scenario.

* Ensures SetSource having the same behavior as the ListWrapper constructor.
2022-09-14 18:10:40 -07:00
Charlie Kindel
4bb51d942a Merge branch 'develop' of tig:migueldeicaza/gui.cs into develop 2022-09-05 13:49:47 -06:00
BDisp
d368215e07 Fixes #1987. Textview insert text newline fix (#1988)
* Fixes #1987. TextView InsertText does not respect newlines

* Added support for CRLF as well.
2022-09-05 12:49:39 -07:00
BDisp
389d0be6bd Added abstract MakeColor and CreateColors to create the colors at once. (#1972)
* Added abstract MakeColor and CreateColors to create the colors at once.

* Adjusting colors to contrast with almost all views.

* Reverting Border unit test.

* Removing commented color code.
2022-09-05 12:47:16 -07:00
Charlie Kindel
0de748d8c9 Merge branch 'develop' of tig:migueldeicaza/gui.cs into develop 2022-09-05 08:28:42 -06:00
BDisp
3866e65919 Fixes #1989. ListView: Ensures SelectedItem visibility on MoveDown and MoveUp. (#1990)
* Ensures visibility SelectedItem on MoveDown and MoveUp.

* Fix VisibleItems to Frame.Height.
2022-09-05 07:25:57 -07:00
BDisp
9505987d40 Fixes #1984. Setting Label.Visible to false does not hide the Label (#1985) 2022-09-05 07:25:11 -07:00
Charlie Kindel
9f5c8de500 Merge branch 'develop' of tig:migueldeicaza/gui.cs into develop 2022-09-05 08:23:39 -06:00
Tig Kindel
e46813c177 Revert "Fixes #1979. MessageBox.Query not wrapping since 1.7.1 (#1980)" (#1992)
This reverts commit c336b512f2.
2022-09-05 07:23:33 -07:00
BDisp
31082c001c Added SplitNewLine method to the TextFormatter. (#1982) 2022-09-05 07:23:24 -07:00
Charlie Kindel
86c0477966 Merge branch 'develop' of tig:migueldeicaza/gui.cs into develop 2022-09-05 08:19:03 -06:00
BDisp
c336b512f2 Fixes #1979. MessageBox.Query not wrapping since 1.7.1 (#1980) 2022-09-05 07:18:22 -07:00
Thomas Nind
bfe9878554 Add ToArray to prevent 'Collection has been modified' Exception in older runtimes (#1976) 2022-09-05 07:18:10 -07:00
BDisp
13948501d5 Fixes #1973. Avoid positioning Submenus off screen. (#1975)
* Fixes #1973. Avoid positioning Submenus off screen.

* Firstly avoids negative positions on the sub-menus and then avoids the bottom not exceeding the console height, as possible.
2022-09-05 07:17:58 -07:00
BDisp
e767ae14eb Fixes #1969. ESC on CursesDriver take to long to being processed. (#1970)
* Fixes #1969. ESC on CursesDriver take to long to being processed.

* Increasing set_escdelay and timeout values to ensure precessing any more long delay.
2022-09-05 07:17:23 -07:00
BDisp
2594706a69 Fixes #1967. New keys for DeleteAll on TextField and TextView. (#1968)
* Fixes #1967. New keys for DeleteAll on TextField and TextView.

* Changing unit test for the new keys.
2022-09-05 07:17:10 -07:00
Jeff Greene
bbbacf4514 Fixes #1963. Only remove one character on backspace when wordwrap is on (#1964)
* Fixed double delete when wordwrap is enabled

* Fixes #1963. Deletes multiple characters editing a TextView with WordWrap enabled.

Co-authored-by: BDisp <bd.bdisp@gmail.com>
Co-authored-by: Tig Kindel <tig@users.noreply.github.com>
2022-09-05 07:16:32 -07:00
dependabot[bot]
c6af956e22 Bump Microsoft.NET.Test.Sdk from 17.3.0 to 17.3.1 (#1977)
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.3.0 to 17.3.1.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Commits](https://github.com/microsoft/vstest/compare/v17.3.0...v17.3.1)

---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-05 06:53:07 -07:00
Thomas Nind
8a90453bb2 Fixes #1962 - Change KeyBindings to allow chaining commands (#1966)
* Change KeyBindings to allow chaining commands

* Added more asserts for repeating the keybinding till at bottom of list

* Added tests for 'no command' and multiple commands return type
2022-08-30 05:58:22 -07:00
Charlie Kindel
5e5fc3bd4c Merge branch 'main' of tig:migueldeicaza/gui.cs into develop 2022-08-30 06:55:36 -06:00
Thomas Nind
08ea331134 Fixed null reference in Keybindings Scenario and hotkey collision (#1965) 2022-08-25 05:46:28 -07:00
dependabot[bot]
5b102d57fb Bump Microsoft.NETFramework.ReferenceAssemblies from 1.0.2 to 1.0.3 (#1958)
Bumps [Microsoft.NETFramework.ReferenceAssemblies](https://github.com/Microsoft/dotnet) from 1.0.2 to 1.0.3.
- [Release notes](https://github.com/Microsoft/dotnet/releases)
- [Commits](https://github.com/Microsoft/dotnet/commits)

---
updated-dependencies:
- dependency-name: Microsoft.NETFramework.ReferenceAssemblies
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tig Kindel <tig@users.noreply.github.com>
2022-08-24 19:42:05 -07:00
Juan Manuel Elosegui
73846b3c32 Fixes #1959: GoToEnd should not fail on an empty TreeView (#1960)
Co-authored-by: Tig Kindel <tig@users.noreply.github.com>
2022-08-24 19:41:50 -07:00
BDisp
c43183ff14 Fixes #1953. TextView cursor position is not updating by mouse. (#1954)
* Fixes #1953. TextView cursor position is not updating by mouse.

* Only invoking UnwrappedCursorPosition in the OnUnwrappedCursorPosition method.
2022-08-24 18:37:31 -07:00
Tig Kindel
375cd9f298 Merge branch 'develop' of tig:gui-cs/Terminal.Gui into develop 2022-08-17 09:52:28 -06:00
BDisp
6b88f31edf Fixes #1951. TextView with selected text doesn't scroll beyond the cursor position. (#1952)
Co-authored-by: Tig Kindel <tig@users.noreply.github.com>
2022-08-12 08:40:24 -07:00
dependabot[bot]
82c694b515 Bump Microsoft.NET.Test.Sdk from 17.2.0 to 17.3.0 (#1947)
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.2.0 to 17.3.0.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Commits](https://github.com/microsoft/vstest/compare/v17.2.0...v17.3.0)

---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-12 08:22:57 -07:00
saskathex
dc99fb354f Fix: The synchronization context method Send is now blocking (#1854)
* Fix: The sychronization context method send 

The send method of the synchronization context has to block the caller thread in case it is not the main thread.

* Fix: Send has to invoke the action instantly

Send has to invoke the action instantly instead of enqueuing in case of main thread call.

* Added unit tests for synchronization post/send methods.

* Code formating

* Added unit test for MainLoopSyncContext.CreateCopy

Co-authored-by: saskathex <>
Co-authored-by: Tig Kindel <tig@users.noreply.github.com>
2022-08-12 08:22:34 -07:00
BDisp
f01132ca0e Fixes #1948. It isn't possible to get unwrapped cursor position when word wrap is enabled on TextView. (#1949) 2022-08-11 06:53:08 -07:00
BDisp
4573990b46 Ensures that the isButtonShift flag is disabled in all situations. (#1945)
* Ensures that the isButtonShift flag is disabled in all situations.

* Improving this unit test.
2022-08-05 10:01:55 -07:00
Tig Kindel
1653a2d2b7 Merge main to develop post v1.7.2 (#1942) 2022-08-05 10:01:19 -07:00
Tig Kindel
69c8c070a8 Merge branch 'develop' into main 2022-08-05 09:56:20 -07:00
BDisp
7ade996ef4 Fixes #1943. Mouse ButtonShift is not preserving the text selected when clicking on another position. (#1944) 2022-08-04 20:01:40 -07:00
Tig Kindel
8e20fb788d Merge branch 'develop' of tig:gui-cs/Terminal.Gui into develop v1.7.2 2022-08-04 15:43:39 -06:00