Fix incorrect icon offset

This commit is contained in:
Andrei Zavatski
2019-12-25 22:09:14 +03:00
parent c77679e36c
commit bb4d02a1f8
3 changed files with 6 additions and 3 deletions

View File

@ -14,7 +14,10 @@ namespace osu.Game.Graphics.UserInterface
{ {
public abstract class ScreenTitle : CompositeDrawable, IHasAccentColour public abstract class ScreenTitle : CompositeDrawable, IHasAccentColour
{ {
public const float ICON_WIDTH = ICON_SIZE + spacing;
public const float ICON_SIZE = 30; public const float ICON_SIZE = 30;
private const float spacing = 6;
private const int text_offset = 2; private const int text_offset = 2;
private SpriteIcon iconSprite; private SpriteIcon iconSprite;
@ -61,7 +64,7 @@ namespace osu.Game.Graphics.UserInterface
new FillFlowContainer new FillFlowContainer
{ {
AutoSizeAxes = Axes.Both, AutoSizeAxes = Axes.Both,
Spacing = new Vector2(6, 0), Spacing = new Vector2(spacing, 0),
Direction = FillDirection.Horizontal, Direction = FillDirection.Horizontal,
Children = new[] Children = new[]
{ {

View File

@ -39,7 +39,7 @@ namespace osu.Game.Overlays
Depth = -float.MaxValue, Depth = -float.MaxValue,
Children = new Drawable[] Children = new Drawable[]
{ {
CreateTitle().With(t => t.X = -ScreenTitle.ICON_SIZE), CreateTitle().With(t => t.X = -ScreenTitle.ICON_WIDTH),
TabControl = new OverlayHeaderTabControl TabControl = new OverlayHeaderTabControl
{ {
Anchor = Anchor.BottomLeft, Anchor = Anchor.BottomLeft,

View File

@ -42,7 +42,7 @@ namespace osu.Game.Screens.Multi
{ {
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
Origin = Anchor.BottomLeft, Origin = Anchor.BottomLeft,
X = -ScreenTitle.ICON_SIZE, X = -ScreenTitle.ICON_WIDTH,
}, },
breadcrumbs = new HeaderBreadcrumbControl(stack) breadcrumbs = new HeaderBreadcrumbControl(stack)
{ {