<commit_before>﻿// Copyright (c) ppy Pty Ltd <<EMAIL>>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using osuTK;
using osuTK.Graphics;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.Events;

namespace osu.Game.Graphics.UserInterface
{
    public class IconButton : OsuAnimatedButton
    {
        public const float BUTTON_SIZE = 30;

        private Color4? iconColour;

        /// <summary>
        /// The icon colour. This does not affect <see cref="IconButton.Colour"/>.
        /// </summary>
        public Color4 IconColour
        {
            get => iconColour ?? Color4.White;
            set
            {
                iconColour = value;
                icon.Colour = value;
            }
        }

        private Color4? iconHoverColour;

        /// <summary>
        /// The icon colour while the <see cref="IconButton"/> is hovered.
        /// </summary>
        public Color4 IconHoverColour
        {
            get => iconHoverColour ?? IconColour;
            set => iconHoverColour = value;
        }

        /// <summary>
        /// The icon.
        /// </summary>
        public IconUsage Icon
        {
            get => icon.Icon;
            set => icon.Icon = value;
        }

        /// <summary>
        /// The icon scale. This does not affect <see cref="IconButton.Scale"/>.
        /// </summary>
        public Vector2 IconScale
        {
            get => icon.Scale;
            set => icon.Scale = value;
        }

        /// <summary>
        /// The size of the <see cref="IconButton"/> while it is not being pressed.
        /// </summary>
        public Vector2 ButtonSize
        {
            get => Content.Size;
            set
            {
                Content.RelativeSizeAxes = Axes.None;
                Content.Size = value;
            }
        }

        private readonly SpriteIcon icon;

        public IconButton()
        {
            AutoSizeAxes = Axes.Both;
            ButtonSize = new Vector2(BUTTON_SIZE);
<commit_msg>Fix editor regressions<commit_after>﻿// Copyright (c) p<NAME> Ltd <<EMAIL>>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using osuTK;
using osuTK.Graphics;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.Events;

namespace osu.Game.Graphics.UserInterface
{
    public class IconButton : OsuAnimatedButton
    {
        public const float BUTTON_SIZE = 30;

        private Color4? iconColour;

        /// <summary>
        /// The icon colour. This does not affect <see cref="IconButton.Colour"/>.
        /// </summary>
        public Color4 IconColour
        {
            get => iconColour ?? Color4.White;
            set
            {
                iconColour = value;
                icon.Colour = value;
            }
        }

        private Color4? iconHoverColour;

        /// <summary>
        /// The icon colour while the <see cref="IconButton"/> is hovered.
        /// </summary>
        public Color4 IconHoverColour
        {
            get => iconHoverColour ?? IconColour;
            set => iconHoverColour = value;
        }

        /// <summary>
        /// The icon.
        /// </summary>
        public IconUsage Icon
        {
            get => icon.Icon;
            set => icon.Icon = value;
        }

        /// <summary>
        /// The icon scale. This does not affect <see cref="IconButton.Scale"/>.
        /// </summary>
        public Vector2 IconScale
        {
            get => icon.Scale;
            set => icon.Scale = value;
        }

        /// <summary>
        /// The size of the <see cref="IconButton"/> while it is not being pressed.
        /// </summary>
        public Vector2 ButtonSize
        {
            get => Content.Size;
            set
            {
                Content.RelativeSizeAxes = Axes.None;
                Content.AutoSizeAxes = Axes.None;
                Content.Size = value;
            }
        }

        private readonly SpriteIcon icon;

        public IconButton()
        {
            AutoSizeAxes = Axes.Both;
            ButtonSize = new Vector2(BUTTON_SIZE);

{'fraction_non_alphanumeric': 0.10422996027109138, 'fraction_numerical': 0.004673989249824725, 'mean_word_length': 1.4304372515616126, 'pattern_counts': {'":': 0, '<': 36, '<?xml version=': 0, '>': 52, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7382512', 'n_tokens_mistral': 1183, 'n_tokens_neox': 1137, 'n_words': 321}