1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Fix linter issues

This commit is contained in:
Drew DeVault 2017-03-15 22:39:09 -04:00
parent 0000cf1bee
commit 360340c61d
4 changed files with 8 additions and 5 deletions

View File

@ -2,6 +2,7 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Linq;
using OpenTK.Graphics;
using osu.Framework.Allocation;
using osu.Framework.Graphics.UserInterface.Tab;
@ -37,8 +38,10 @@ namespace osu.Game.Graphics.UserInterface
set
{
accentColour = value;
(DropDown as OsuTabDropDownMenu<T>).AccentColour = value;
foreach (OsuTabItem<T> item in TabContainer.Children)
var dropDown = DropDown as OsuTabDropDownMenu<T>;
if (dropDown != null)
dropDown.AccentColour = value;
foreach (var item in TabContainer.Children.OfType<OsuTabItem<T>>())
item.AccentColour = value;
}
}

View File

@ -4,7 +4,6 @@
using osu.Framework.Graphics;
using osu.Framework.Graphics.Primitives;
using osu.Framework.Graphics.UserInterface.Tab;
using osu.Game.Graphics;
namespace osu.Game.Graphics.UserInterface
{

View File

@ -1,6 +1,7 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Linq;
using OpenTK;
using OpenTK.Graphics;
using osu.Framework.Allocation;
@ -25,7 +26,7 @@ namespace osu.Game.Graphics.UserInterface
{
accentColour = value;
Header.Colour = value;
foreach (OsuTabDropDownMenuItem<T> item in ItemList)
foreach (var item in ItemList.OfType<OsuTabDropDownMenuItem<T>>())
item.AccentColour = value;
}
}

View File

@ -31,7 +31,7 @@ namespace osu.Game.Graphics.UserInterface
private Color4? accentColour;
public Color4 AccentColour
{
get { return accentColour.Value; }
get { return accentColour.GetValueOrDefault(); }
set
{
accentColour = value;