Exemple #1
0
 private void load(OverlayColourProvider colourProvider)
 {
     RelativeSizeAxes = Axes.X;
     AutoSizeAxes     = Axes.Y;
     AddRangeInternal(new Drawable[]
     {
         new Box
         {
             RelativeSizeAxes = Axes.Both,
             Colour           = colourProvider.Background5
         },
         new FillFlowContainer
         {
             RelativeSizeAxes = Axes.X,
             AutoSizeAxes     = Axes.Y,
             Direction        = FillDirection.Vertical,
             Children         = new Drawable[]
             {
                 commentCounter = new TotalCommentsCounter(),
                 new CommentsHeader
                 {
                     Sort        = { BindTarget = Sort },
                     ShowDeleted = { BindTarget = ShowDeleted }
                 },
                 content = new FillFlowContainer
                 {
                     RelativeSizeAxes = Axes.X,
                     AutoSizeAxes     = Axes.Y,
                     Direction        = FillDirection.Vertical,
                 },
                 new Container
                 {
                     RelativeSizeAxes = Axes.X,
                     AutoSizeAxes     = Axes.Y,
                     Children         = new Drawable[]
                     {
                         new Box
                         {
                             RelativeSizeAxes = Axes.Both,
                             Colour           = colourProvider.Background4
                         },
                         new FillFlowContainer
                         {
                             RelativeSizeAxes = Axes.X,
                             AutoSizeAxes     = Axes.Y,
                             Direction        = FillDirection.Vertical,
                             Children         = new Drawable[]
                             {
                                 deletedChildrenPlaceholder = new DeletedChildrenPlaceholder
                                 {
                                     ShowDeleted = { BindTarget = ShowDeleted }
                                 },
                                 new Container
                                 {
                                     AutoSizeAxes     = Axes.Y,
                                     RelativeSizeAxes = Axes.X,
                                     Child            = moreButton = new CommentsShowMoreButton
                                     {
                                         Anchor    = Anchor.Centre,
                                         Origin    = Anchor.Centre,
                                         Margin    = new MarginPadding(5),
                                         Action    = getComments,
                                         IsLoading = true,
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     });
 }
Exemple #2
0
        private void load(OverlayColourProvider colourProvider)
        {
            RelativeSizeAxes = Axes.X;
            AutoSizeAxes     = Axes.Y;
            AddRangeInternal(new Drawable[]
            {
                new Box
                {
                    RelativeSizeAxes = Axes.Both,
                    Colour           = colourProvider.Background5
                },
                new FillFlowContainer
                {
                    RelativeSizeAxes = Axes.X,
                    AutoSizeAxes     = Axes.Y,
                    Direction        = FillDirection.Vertical,
                    Children         = new Drawable[]
                    {
                        commentCounter = new TotalCommentsCounter(),
                        new Container
                        {
                            RelativeSizeAxes = Axes.X,
                            AutoSizeAxes     = Axes.Y,
                            Children         = new Drawable[]
                            {
                                new Box
                                {
                                    RelativeSizeAxes = Axes.Both,
                                    Colour           = colourProvider.Background4,
                                },
                                pinnedContent = new FillFlowContainer
                                {
                                    RelativeSizeAxes = Axes.X,
                                    AutoSizeAxes     = Axes.Y,
                                    Direction        = FillDirection.Vertical,
                                },
                            },
                        },
                        new CommentsHeader
                        {
                            Sort        = { BindTarget = Sort },
                            ShowDeleted = { BindTarget = ShowDeleted }
                        },
                        content = new FillFlowContainer
                        {
                            RelativeSizeAxes = Axes.X,
                            AutoSizeAxes     = Axes.Y,
                            Direction        = FillDirection.Vertical,
                        },
                        new Container
                        {
                            Name             = @"Footer",
                            RelativeSizeAxes = Axes.X,
                            AutoSizeAxes     = Axes.Y,
                            Children         = new Drawable[]
                            {
                                new FillFlowContainer
                                {
                                    RelativeSizeAxes = Axes.X,
                                    AutoSizeAxes     = Axes.Y,
                                    Direction        = FillDirection.Vertical,
                                    Margin           = new MarginPadding {
                                        Bottom = 20
                                    },
                                    Children = new Drawable[]
                                    {
                                        deletedCommentsCounter = new DeletedCommentsCounter
                                        {
                                            ShowDeleted = { BindTarget = ShowDeleted },
                                            Margin      = new MarginPadding
                                            {
                                                Horizontal = 70,
                                                Vertical   = 10
                                            }
                                        },
                                        new Container
                                        {
                                            AutoSizeAxes     = Axes.Y,
                                            RelativeSizeAxes = Axes.X,
                                            Child            = moreButton = new CommentsShowMoreButton
                                            {
                                                Anchor = Anchor.Centre,
                                                Origin = Anchor.Centre,
                                                Margin = new MarginPadding
                                                {
                                                    Vertical = 10
                                                },
                                                Action    = getComments,
                                                IsLoading = true,
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            });

            User.BindTo(api.LocalUser);
        }