Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Optimize Popover impl. + support Gtk based reference widgets #639

Merged
merged 13 commits into from
Feb 16, 2017

Conversation

sevoku
Copy link
Member

@sevoku sevoku commented Feb 9, 2017

This PR includes various PopoverBackend fixes:

  • Closed event was missing
  • Resizing fixed
  • Padding was missing
  • BackgroundColor fixed
  • Support for custom NSAppearance
  • Positioning fixed

The last commit 29c2803 allows to attach a Popover to a Gtk based Widget.

@slluis
Copy link
Member

slluis commented Feb 9, 2017

BTW, now that Xamarin.Mac is open source, we should remove MonoMac support.

Fill the internal ContentView (including the popover
arrow) with the background color and
don't modify the child widget.
DidClose is not guaranteed to be executed before
the Popover or its Delegate have been Disposed
and/or GCd and may crash.
The new implementation is more complex. It
relies on a back reference to the Backend and
the NSPopover Delegate, hence we can't
abuse the Xwt ViewController fur custom
implementations.
WidgetSpacing padding = 0;
if (Backend != null)
padding = Backend.Frontend.Padding;
View.AddConstraints (new NSLayoutConstraint [] {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should likely disable the NativeChild's translatesAutoresizingMaskIntoConstraints property

@garuma garuma merged commit 8b1a8c0 into mono:master Feb 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants