<commit_before>﻿// Copyright (c) 2007-2018 ppy Pty Ltd <<EMAIL>>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE

using OpenTK;
using OpenTK.Graphics;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Overlays.Changelog.Header;
using System;

namespace osu.Game.Overlays.Changelog
{
    public class ChangelogHeader : Container
    {
        protected Color4 Purple = new Color4(191, 4, 255, 255);
        private readonly Sprite coverImage;
        private readonly Sprite headerBadge;
        private readonly OsuSpriteText titleStream;
        private readonly TextBadgePairListing listing;
        private readonly SpriteIcon chevron;
        private readonly TextBadgePairRelease releaseStream;

        public delegate void ListingSelectedEventHandler();

        public event ListingSelectedEventHandler ListingSelected;

        private const float cover_height = 280;
        private const float title_height = 50;
        private const float icon_size = 50;
        private const float icon_margin = 20;
        private const float version_height = 40;

        public ChangelogHeader()
        {
            RelativeSizeAxes = Axes.X;
            Height = cover_height;
            Children = new Drawable[]
            {
                coverImage = new Sprite
                {
                    RelativeSizeAxes = Axes.Both,
                    FillMode = FillMode.Fill,
                },
                new Container
                {
                    Height = title_height,
                    Anchor = Anchor.BottomLeft,
                    Origin = Anchor.BottomLeft,
                    Y = -version_height,
                    Children = new Drawable[]
                    {
                        new CircularContainer
                        {
                            X = icon_margin,
                            Masking = true,
                            BorderColour = Purple,
                            BorderThickness = 3,
                            MaskingSmoothness = 1,
                            Size = new Vector2(50),
                            Children = new Drawable[]
                            {
                                headerBadge = new Sprite
                                {
                                    RelativeSizeAxes = Axes.Both,
                                    Size = new Vector2(0.8f),
                                    Anchor = Anchor.Centre,
                                    Origin = Anchor.Centre,
                                },

                                // this box has 2 functions:
                                // - ensures the circle doesn't disappear on the X and Y edges
                                // - gets rid of the white "contamination" on the circle (due to smoothing)
                                //   (https://i.imgur.com/SMuvWBZ.png)
                                new Box
                                {
                                    RelativeSizeAxes = Axes.Both,
                                    Alpha = 0,
                                    AlwaysPresent = true,
                                    Colour = Purple,
                                }
                            }
                        },
                        new FillFlowContainer
                        {
                            AutoSizeAxes = Axes.Both,
                            Direction = FillDirection.Horizontal,
                            Anchor = Anchor.CentreLeft,
                            Origin = Anchor.CentreLeft,
                            X = icon_size + icon_margin * 2,
                            Children = new Drawable[]
                            {
                                new OsuSpriteText
                                {
                                    Text = "Changelog ",
                                    Font = @"Exo2.0-Light",
                                    TextSize = 38, // web: 30
                                },
                                titleStream = new OsuSpriteText
                                {
                                    Text = "Listing",
                                    TextSize = 38, // web: 30
                                    Font = @"Exo2.0-Light",
                                    Colour = Purple,
                                },
                            }
                        }
                    }
                },
                new FillFlowContainer // Listing > Lazer 2018.713.1
                {
                    X = 2 * icon_margin + icon_size - 8,
                    Height = version_height,
                    Anchor = Anchor.BottomLeft,
                    Origin = Anchor.BottomLeft,
                    Direction = FillDirection.Horizontal,
                    Children = new Drawable[]
                    {
                        listing = new TextBadgePairListing(Purple),
                        new Container // without a container, moving the chevron wont work
                        {
                            Anchor = Anchor.CentreLeft,
                            Origin = Anchor.CentreLeft,
                            Margin = new MarginPadding
                            {
                                Top = 10,
                                Left = 15,
                                Right = 18,
                                Bottom = 15,
                            },
                            Children = new Drawable[]
                            {
                                chevron = new SpriteIcon
                                {
                                    Anchor = Anchor.Centre,
                                    Origin = Anchor.Centre,
                                    Size = new Vector2(7),
                                    Colour = Purple,
                                    Icon = FontAwesome.fa_chevron_right,
                                    Alpha = 0,<commit_msg>Move breadcrumb to the right position<commit_after>﻿// Copyright (c) 2007-2018 ppy Pty Ltd <<EMAIL>>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE

using OpenTK;
using OpenTK.Graphics;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Overlays.Changelog.Header;
using System;

namespace osu.Game.Overlays.Changelog
{
    public class ChangelogHeader : Container
    {
        protected Color4 Purple = new Color4(191, 4, 255, 255);
        private readonly Sprite coverImage;
        private readonly Sprite headerBadge;
        private readonly OsuSpriteText titleStream;
        private readonly TextBadgePairListing listing;
        private readonly SpriteIcon chevron;
        private readonly TextBadgePairRelease releaseStream;

        public delegate void ListingSelectedEventHandler();

        public event ListingSelectedEventHandler ListingSelected;

        private const float cover_height = 280;
        private const float title_height = 50;
        private const float icon_size = 50;
        private const float icon_margin = 20;
        private const float version_height = 40;

        public ChangelogHeader()
        {
            RelativeSizeAxes = Axes.X;
            Height = cover_height;
            Children = new Drawable[]
            {
                coverImage = new Sprite
                {
                    RelativeSizeAxes = Axes.Both,
                    FillMode = FillMode.Fill,
                },
                new Container
                {
                    Height = title_height,
                    Anchor = Anchor.BottomLeft,
                    Origin = Anchor.BottomLeft,
                    Y = -version_height,
                    Children = new Drawable[]
                    {
                        new CircularContainer
                        {
                            X = icon_margin,
                            Masking = true,
                            BorderColour = Purple,
                            BorderThickness = 3,
                            MaskingSmoothness = 1,
                            Size = new Vector2(50),
                            Children = new Drawable[]
                            {
                                headerBadge = new Sprite
                                {
                                    RelativeSizeAxes = Axes.Both,
                                    Size = new Vector2(0.8f),
                                    Anchor = Anchor.Centre,
                                    Origin = Anchor.Centre,
                                },

                                // this box has 2 functions:
                                // - ensures the circle doesn't disappear on the X and Y edges
                                // - gets rid of the white "contamination" on the circle (due to smoothing)
                                //   (https://i.imgur.com/SMuvWBZ.png)
                                new Box
                                {
                                    RelativeSizeAxes = Axes.Both,
                                    Alpha = 0,
                                    AlwaysPresent = true,
                                    Colour = Purple,
                                }
                            }
                        },
                        new FillFlowContainer
                        {
                            AutoSizeAxes = Axes.Both,
                            Direction = FillDirection.Horizontal,
                            Anchor = Anchor.CentreLeft,
                            Origin = Anchor.CentreLeft,
                            X = icon_size + icon_margin * 2,
                            Children = new Drawable[]
                            {
                                new OsuSpriteText
                                {
                                    Text = "Changelog ",
                                    Font = @"Exo2.0-Light",
                                    TextSize = 38, // web: 30
                                },
                                titleStream = new OsuSpriteText
                                {
                                    Text = "Listing",
                                    TextSize = 38, // web: 30
                                    Font = @"Exo2.0-Light",
                                    Colour = Purple,
                                },
                            }
                        }
                    }
                },
                new FillFlowContainer // Listing > Lazer 2018.713.1
                {
                    X = 2 * icon_margin + icon_size,
                    Height = version_height,
                    Anchor = Anchor.BottomLeft,
                    Origin = Anchor.BottomLeft,
                    Direction = FillDirection.Horizontal,
                    Children = new Drawable[]
                    {
                        listing = new TextBadgePairListing(Purple),
                        new Container // without a container, moving the chevron wont work
                        {
                            Anchor = Anchor.CentreLeft,
                            Origin = Anchor.CentreLeft,
                            Margin = new MarginPadding
                            {
                                Top = 10,
                                Left = 15,
                                Right = 18,
                                Bottom = 15,
                            },
                            Children = new Drawable[]
                            {
                                chevron = new SpriteIcon
                                {
                                    Anchor = Anchor.Centre,
                                    Origin = Anchor.Centre,
                                    Size = new Vector2(7),
                                    Colour = Purple,
                                    Icon = FontAwesome.fa_chevron_right,
                                    Alpha = 0,
{'fraction_non_alphanumeric': 0.056076996500159085, 'fraction_numerical': 0.01185173401209036, 'mean_word_length': 0.7836572563484182, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 72, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7549769', 'n_tokens_mistral': 2911, 'n_tokens_neox': 2543, 'n_words': 633}