示例#1
0
            public VignetteCaret()
            {
                RelativeSizeAxes = Axes.Y;
                Size             = new Vector2(1, 0.6f);

                Anchor = Anchor.CentreLeft;
                Origin = Anchor.CentreLeft;

                InternalChild = cursor = new ThemedSolidBox
                {
                    RelativeSizeAxes = Axes.Both,
                    ThemeColour      = ThemeColour.Black,
                };
            }
示例#2
0
        public ThemedSliderBar()
        {
            Height       = slider_bar_height;
            RangePadding = slider_bar_height / 2;

            AddRange(new Drawable[]
            {
                left = new ThemedSolidBox
                {
                    Width            = 0.5f,
                    Anchor           = Anchor.CentreLeft,
                    Origin           = Anchor.CentreLeft,
                    Height           = slider_bar_thickness,
                    Position         = new Vector2(2, 0),
                    ThemeColour      = ThemeColour.ThemePrimary,
                    RelativeSizeAxes = Axes.None,
                },
                right = new ThemedSolidBox
                {
                    Width            = 0.5f,
                    Anchor           = Anchor.CentreRight,
                    Origin           = Anchor.CentreRight,
                    Height           = slider_bar_thickness,
                    Position         = new Vector2(-2, 0),
                    ThemeColour      = ThemeColour.NeutralQuaternaryAlt,
                    RelativeSizeAxes = Axes.None,
                },
                new Container
                {
                    Padding = new MarginPadding {
                        Horizontal = RangePadding
                    },
                    RelativeSizeAxes = Axes.Both,
                    Child            = new Container
                    {
                        RelativeSizeAxes = Axes.Both,
                        Child            = nub = new ThemedSolidCircle
                        {
                            RelativePositionAxes = Axes.X,
                            ThemeColour          = ThemeColour.ThemePrimary,
                            Origin = Anchor.TopCentre,
                            Size   = new Vector2(slider_bar_height),
                        },
                    },
                },
            });
        }