Commit Graph

6510 Commits

Author SHA1 Message Date
BDisp
ecc44fce91 Merge branch 'v2_develop' into v2_2489_scroll-scrollbar-new 2024-08-23 16:54:28 +01:00
BDisp
6498610de9 Fixes #3678. ContextMenu accesses disposed MenuBar. (#3681)
* Fixes #3678. ContextMenu accesses disposed MenuBar.

* Preserve always the last menu opened.

* Re-added MenuAllClosed event.

* Ensures call CleanUp if Application.MouseGrabView hold another MenuBar than the calling one.

* Fix unit tests.

* Passing the offending object instead of the View type.

* Add that to the dictionary to shut respeller up.

* Address a few warnings

* A question

* Just a little more cleanup

* Combine these and comment

* Slight additional cleanup

* More minor cleanup

We already know it is null. just make it the else instead of a new condition

* Nullable != true ===> is not true

* Unconditional break at the top is just a part of the while statement (inverted)

* Fixes #3687. ColorPicker isn't respecting the current UI culture.

* Fix @dodexahedron erroneous code.

* Cleanup comments.

---------

Co-authored-by: Brandon Thetford <github@snapsinazfs.com>
Co-authored-by: Tig <tig@users.noreply.github.com>
2024-08-23 09:47:09 -06:00
BDisp
c1d82947aa Fixes #3682. CanFocus true for Label works only for keyboard and not mouse. (#3683)
* Fixes #3682. CanFocus true for Label works only for keyboard and not mouse.

* Simplifying code.

---------

Co-authored-by: Tig <tig@users.noreply.github.com>
2024-08-23 09:46:52 -06:00
BDisp
479ff3dc76 Merge branch 'v2_develop' into v2_2489_scroll-scrollbar-new 2024-08-23 16:46:42 +01:00
BDisp
5e7bb7bd6c Starting implementing ScrollBar. 2024-08-23 16:45:41 +01:00
Tig
e21f158077 Fixes #3689. Release builds broken (#3690)
* Initial commit

* added #if DEBUG_IDISPOSABLE

* Tweaked yml
2024-08-23 09:22:00 -06:00
BDisp
385a1913f7 Fixes #3687. ColorPicker isn't respecting the current UI culture. 2024-08-23 08:06:16 -06:00
BDisp
3b6abeb741 Fixes #3679. WantContinuousButtonPressed mustn't force calling GrabMouse. (#3680)
Co-authored-by: Tig <tig@users.noreply.github.com>
2024-08-22 17:56:50 -06:00
Thomas Nind
38f84f7424 Fixes #2800 - Color picker (supporting hsl, hsv and rgb) (#3604)
* Readonly HSL view

* Make it possible to move between bars by moving to subview

* Basically working and with mouse support

* Fix HSL to work properly with double values instead of color matching

* Fix Value on ColorPicker to match HSL values

* Fix color spectrum

* Add Swatch and better sync with text box

* Work on jitter

* ColorPicker HSL working

* More keybindings

* Add ColorModel

* Support both HSL and HSV

* Add RGB

* Better mouse handling

* WIP: AttributeView and integrate into LineDrawing
(does not currently work properly)

* Fix color picking

* Add concept of an ITool

* Add ColorPickerStyle

* Fix selected cell rendering

* Add first test for ColorPicker2

* Add more RGB tests

* Improve ColorPicker2 setup process

* Tests and fixes for keyboard changing value R

* Fix margin on bars when no textfields

* Add mouse test

* Add tests for with text field

* Add more tests and fix bug sync component text field change with hex text field

(WIP - failing tests)

* Fix tests and fix clicking in a bar label area possibly not selecting

* Move AttributeView to LineDrawing and adjust to have a 'transparent pattern' too

* Render triangle in dark gray if background is black

* Add ColorChanged event

* Resharper Cleanup

* Xml comments and public/private adjustments

* Explore replacing diagram test with fragile Subview diving

* Migrate ColorPicker_DefaultBoot to sub asserts

* Port other tests

* Replace ColorPicker with new view

* Fix ColorPicker size to match scenarios size assumptions

* Split to separate files and ignore invalid test for ColorPicker

* Ignore also in mouse version of AllViews_Enter_Leave_Events

* Remove bool _updating from ColorPicker

Now instead we are more selective about what we update when and do so deterministically

* Typo fix

* Fix ReSharper bad renames in comments for "Value"

* Refactor to single implementation of 'prompt for color' logic

- Now called PromptForColor
- Shared by LineDrawing and ProgressBarStyles scenarios

* Sum runes instead of Length

* Hide ColorBar and SetValueWithoutRaisingEvent from public API

* Move ColorEventArgs to Drawing folder

* Move ColorModel to Drawing folder

* First try at Dim.Auto for ColorPicker

* Remove explicit width/height setting in most scenarios

* Remove explicit heights

* Fixed build/test issues.
Illustrated test best practice.

* WIP: Start working on test changes and add new options to ColorPickers scenario (Color Model and show textfields).

* Fix for R indicator arrow sometimes 'falling off' the drawn area.

* Add nullable enable

* Test fixes and refactor for avoiding Begin

* Make ColorEventArgs inherit from EventArgs<Color>

* Fix Dispose not being called on bars when switching color models

* Remove 'oldColor' from test now it is not supported

* Add initial stab at ColorPickerStyle.ShowName

* Use AppendAutocomplete for color names

* Implemented resoruce based colorname resolver

* Update GetTextField to support getting the color names field
Change style setting to ShowColorName

* Color name updates when navigating away from the named color

* Restore old color picker as ColorPicker16

* Add test that shows 'Save as' is currently considered a named color ><

* Fix GetW3CColorNames

* Removed dupe colors

* Revert to old color pickers

* Nullability question marks for everyone!

---------

Co-authored-by: Tig <tig@users.noreply.github.com>
2024-08-22 17:53:04 -06:00
BDisp
92e067e014 Prevents continuous mouse button pressed from processing mouse event without slider completed the layout. 2024-08-21 22:15:17 +01:00
BDisp
81888222ea Ensures slider to have a length proportional to the bar size. 2024-08-21 22:07:25 +01:00
BDisp
c587cb9f8e Merge branch 'v2_3679_want-continuous-pressed-fix' into v2_2489_scroll-scrollbar-new 2024-08-21 21:22:55 +01:00
BDisp
6add7a1438 Merge branch 'v2_develop' into v2_2489_scroll-scrollbar-new 2024-08-21 21:18:16 +01:00
BDisp
7e3a3b2eaf Fixes #3679. WantContinuousButtonPressed mustn't force calling GrabMouse. 2024-08-21 19:42:46 +01:00
BDisp
e95f821f2b Fixes #3673. NativeAot project isn't using the correct release nuget package. (#3674) 2024-08-19 19:31:51 -06:00
Tig
b267e1698e V2 fix warnings (#3671)
* Fixed NumericUpDown warning

* Fixed Aot Warning

* Fixed warnings in Application.cs

* Fixed more NumericUpDown warning

* Fixed CommandImpl warning

* Fixed Thickness warnings

* Fixed Label warning

* Fixed warning

* Fixed menubar test warning

* Fixed warnings

* Fixed warnings

* Removed dead code

* Fixed warnings
2024-08-19 10:09:15 -06:00
BDisp
ffa08b82a1 Merge branch 'v2_develop' into v2_2489_scroll-scrollbar-new 2024-08-19 16:28:03 +01:00
BDisp
a0c03b11b6 Fixes #3635. Focus gets confused with ContextMenu. (#3663)
* Fixes #3635. Focus gets confused with ContextMenu.

* Improving unit test.

* Updated migration doc to include additional findings. (#3660)

* Updated migration doc to include additional findings.

* Updated per PR recommendations.

---------

Co-authored-by: Tig <tig@users.noreply.github.com>

---------

Co-authored-by: Tig <tig@users.noreply.github.com>
Co-authored-by: Brian Gentry <bgentry@trestledevelopment.com>
2024-08-19 09:14:00 -06:00
Tig
7574c7fff1 Merge pull request #3668 from BDisp/v2_3667_toplevel-menubar-statusbar-remove-fix
Fixes #3667. Null reference in v2 in FindDeepestView.
2024-08-19 09:04:54 -06:00
Brian Gentry
a82636a2ba Updated migration doc to include additional findings. (#3660)
* Updated migration doc to include additional findings.

* Updated per PR recommendations.

---------

Co-authored-by: Tig <tig@users.noreply.github.com>
2024-08-19 08:39:12 -06:00
Tig
388c11da51 Merge branch 'v2_develop' into v2_3667_toplevel-menubar-statusbar-remove-fix 2024-08-19 08:37:55 -06:00
Tig
168d3ca756 Merge pull request #3649 from tig/v2_3521-DimAuto-Equality
Fixes #3521 - `DimAuto` equality broken
2024-08-19 08:36:43 -06:00
Tig
bb85f9099a Accepted changed 2024-08-19 08:21:09 -06:00
BDisp
e59c02ad27 Rename to AdjustScroll method. 2024-08-19 13:16:48 +01:00
Brandon Thetford
dccc06366a Categorize the test fixture 2024-08-18 18:31:23 -07:00
Brandon Thetford
219cfb559a More code reduction. Put these in a primary constructor. Update uses. 2024-08-18 18:30:59 -07:00
Brandon Thetford
e6b67f0fbf Reduce code by inlining these in a primary constructor
Not the final form. Just showing steps.
2024-08-18 18:19:17 -07:00
Brandon Thetford
9082d13e30 Clamping to maximum size of the buffer
Just an extra sanity check/guard
2024-08-18 18:18:03 -07:00
Brandon Thetford
8385153590 Make GetAnchor abstract
There are subtle reasons for this. Regardless, it will be abstract when it's an interface, anyway, so no harm in doing it now.
2024-08-18 18:16:33 -07:00
Brandon Thetford
4e2416f6de Mark non-generic Dim.Has obsolete and fix a comment 2024-08-18 17:39:18 -07:00
Brandon Thetford
730d8e3103 Add a generic form of Dim.Has 2024-08-18 17:38:56 -07:00
Brandon Thetford
e90a115f21 Declare IEqualityOperators for Dim 2024-08-18 17:37:05 -07:00
Tig
34b33e1ca4 Addressed review feedback 2024-08-18 17:27:20 -06:00
Tig
34773a4d07 Merge branch 'v2_develop' into v2_3521-DimAuto-Equality 2024-08-18 17:16:51 -06:00
BDisp
936f9f52e0 Merge branch 'v2_develop' into v2_3667_toplevel-menubar-statusbar-remove-fix 2024-08-18 16:10:46 +01:00
BDisp
9635a434ed Fixes #3667. Null reference in v2 in FindDeepestView. 2024-08-18 15:56:34 +01:00
Tig
c00290ffcc Added unit test & fixed bug (#3666) 2024-08-17 09:22:52 -06:00
BDisp
3386d06c31 Ensure correct Width/Height when orientation is changed. 2024-08-17 00:03:54 +01:00
BDisp
9b896573ec Fix scroll slider when moving mouse outside the host. 2024-08-16 23:57:15 +01:00
BDisp
b025beb32f Rename id to scrollSlider to avoid conflict with the Slider view. 2024-08-16 16:27:54 +01:00
BDisp
3317c504e0 Moving slider code to his class. 2024-08-16 15:17:49 +01:00
BDisp
4e22706021 Using overridden methods instead of events. 2024-08-14 23:41:22 +01:00
BDisp
fa6fb11197 Add internal ScrollSlider class. 2024-08-14 23:03:53 +01:00
Tig
9d36db62ed Merge branch 'v2_develop' into v2_3521-DimAuto-Equality 2024-08-14 15:46:48 -06:00
BDisp
b488796562 Move Scroll.cs to the Scroll folder. 2024-08-14 21:19:00 +01:00
BDisp
c20b733fd9 Merge branch 'v2_develop' into v2_2489_scroll-scrollbar-new 2024-08-14 21:05:07 +01:00
BDisp
91e4abf367 Ensures Position set before call AdjustSlider and 2024-08-14 21:01:02 +01:00
Thomas Nind
f9a1d0345e Split processing autocomplete and drawing it (#3662) 2024-08-14 13:19:32 -06:00
Tig
1b802d4b8f Tweaked primary constructors 2024-08-14 13:06:15 -06:00
Tig
6a13e777ff class Pos -> record Pos 2024-08-14 13:02:11 -06:00