Add ruleset_height to remove magic numbers

This commit is contained in:
DrabWeb 2017-05-30 19:53:06 -03:00
parent 5d6534031e
commit b97691100f
1 changed files with 5 additions and 4 deletions

View File

@ -26,6 +26,7 @@ public class RoomInspector : Container
{
private readonly MarginPadding content_padding = new MarginPadding { Horizontal = 20, Vertical = 10 };
private const float transition_duration = 100;
private const float ruleset_height = 30;
private readonly Box statusStrip;
private readonly Container coverContainer, rulesetContainer, flagContainer;
@ -192,11 +193,11 @@ public RoomInspector()
{
rulesetContainer = new Container
{
Size = new Vector2(30f),
Size = new Vector2(ruleset_height),
},
new Container //todo: game type icon
{
Size = new Vector2(30f),
Size = new Vector2(ruleset_height),
CornerRadius = 15f,
Masking = true,
Children = new[]
@ -211,7 +212,7 @@ public RoomInspector()
new Container
{
AutoSizeAxes = Axes.X,
Height = 30f,
Height = ruleset_height,
Margin = new MarginPadding { Left = 5 },
Children = new[]
{
@ -436,7 +437,7 @@ private void displayBeatmap(BeatmapInfo value)
{
new DifficultyIcon(value)
{
Size = new Vector2(rulesetContainer.DrawHeight),
Size = new Vector2(ruleset_height),
}
};