-
Notifications
You must be signed in to change notification settings - Fork 1k
Replaces current GTK Toolbox with a native one #6324
Conversation
...ddins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/CollectionViewItems.cs
Outdated
Show resolved
Hide resolved
46c7f2f
to
afc7320
Compare
main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.csproj
Outdated
Show resolved
Hide resolved
main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/MacToolbox.cs
Outdated
Show resolved
Hide resolved
main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/MacToolbox.cs
Outdated
Show resolved
Hide resolved
...c/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/MacToolboxWidget.cs
Show resolved
Hide resolved
dcb7b8b
to
546870a
Compare
...ddins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/CollectionViewItems.cs
Outdated
Show resolved
Hide resolved
835cb85
to
d4ab835
Compare
9fbbabe
to
30093ef
Compare
main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/MacToolbox.cs
Show resolved
Hide resolved
{ | ||
nativeChildViews.Add (view); | ||
view.Focused += (s, e) => ChangeFocusedView (s as INativeChildView); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here, but I guess this would be better implemented using the Action/Target cocoa pattern, so that you don't have to keep a list of all views you subscribed too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what do you mean with the list of all views 🤔. This code only exectutes when a view is added to the internal chain loop. This array represents all the elements we want include in the chain to focus, because the tab navigation is broken in native.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Therzok can confirm, but IIRC the Action/Target is better for memory leaks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great! I will try to use this in the future, thanks for the info! 👍
...ddins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/MacToolboxViewItems.cs
Show resolved
Hide resolved
...ddins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/MacToolboxViewItems.cs
Outdated
Show resolved
Hide resolved
...c/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/MacToolboxWidget.cs
Outdated
Show resolved
Hide resolved
...c/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/MacToolboxWidget.cs
Show resolved
Hide resolved
...onoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/MacToolboxWidgetDataSource.cs
Outdated
Show resolved
Hide resolved
...onoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/NativeViews/ExpanderButton.cs
Outdated
Show resolved
Hide resolved
…und stages When we change the current document selected we ask for the service to get new categories and items, when this happens, there is a small time of un-sync state when the control expects a number of items from a sections and the new one could be minor than the older. this could throw an NRE (index of out range)
f20b0dc
to
2b6aa28
Compare
To improve the scrollbar framerate we had to move to use the CALayer rendering engine, needed some changes fixes in our accessibility implementation
It work much better now. A remaining problem is that keyboard handling has problems. Cursor down moves selection correctly, but cursor up does a big jump when trying to go from one category to another. |
main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/MacToolbox.cs
Outdated
Show resolved
Hide resolved
@iainx can you review again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few accessibility notes:
When in full mode, you can't single click to add a text snippet to the editor, only a double click works. For accessibility I think a single click should be ok if you implement AccessibilityPerformClick
In compact mode you can't add a text snippet to the editor at all, neither single click nor double click do anything. Maybe the images that are used as the items need to implement INSAccessibilityButton
There appears to be an extra group in-between the pad and the contents that could be hidden from the accessibility without any problems.
Fixed @iainx ! We added support for each item like an accessibility button and also cover keyboard (ENTER key performs the activation in the selected item) ❤️ |
**
Important note related to colors and style:
I asked @vancura about this and he told me to leave the native styles / colors of Cocoa until they meet in Boston to decide which ones normalize to use.
**
The current toolbar includes all behaviour than GTK control.
Additional considerations for testing:
NativeViewHelper.cs
It also includes Accessibility in all elements from the Toolbar from both modes of visualization and
Fixes Bug #637219
https://devdiv.visualstudio.com/DevDiv/_workitems/edit/637219
TODO: