Esempio n. 1
0
        public void OnInitialize()
        {
            if (scrollview == null)
            {
                ///View.AddSubview(progressIndicator);

                scrollview       = new ScrollView();
                nativeScrollView = (FNSScrollview)scrollview.NativeObject;
                View.AddSubview(nativeScrollView);
                nativeScrollView.Frame = View.Bounds;

                windowController = (DocumentWindowController)this.View.Window.WindowController;
                windowController.VersionSelected  += WindowController_VersionSelected;
                windowController.RefreshRequested += WindowController_RefreshRequested;
            }
        }
Esempio n. 2
0
        public FigmaFileDocumentController()
        {
            container = new NSStackView();

            container.Spacing               = 10;
            container.WantsLayer            = true;
            container.Layer.BackgroundColor = NSColor.DarkGray.CGColor;

            container.Distribution = NSStackViewDistribution.Fill;
            container.Orientation  = NSUserInterfaceLayoutOrientation.Vertical;

            _content           = GtkMacInterop.NSViewToGtkWidget(container);
            _content.CanFocus  = true;
            _content.Sensitive = true;

            var scrollView = new FNSScrollview()
            {
                HasVerticalScroller   = true,
                HasHorizontalScroller = true,
            };

            scrollView.AutohidesScrollers = false;
            scrollView.BackgroundColor    = NSColor.DarkGray;
            scrollView.ScrollerStyle      = NSScrollerStyle.Legacy;

            scrollViewWrapper = new ScrollView(scrollView);

            var contentView = new NSView();

            contentView.AutoresizingMask = NSViewResizingMask.WidthSizable | NSViewResizingMask.HeightSizable;
            scrollView.DocumentView      = contentView;

            container.AddArrangedSubview(scrollView);

            _content.ShowAll();

            grid          = PropertyPad.Instance.Control;
            grid.Changed += PropertyPad_Changed;
        }