Remove width specifications

This commit is contained in:
Dean Herbert 2019-07-29 02:47:26 +09:00
parent de8f502871
commit 663f34d3d8
3 changed files with 13 additions and 6 deletions

View File

@ -24,6 +24,7 @@ public ChannelSelectorTabItem()
Icon.Alpha = 0;
Text.Font = Text.Font.With(size: 45);
Text.Truncate = false;
}
[BackgroundDependencyLoader]

View File

@ -87,12 +87,16 @@ public ChannelTabItem(Channel value)
},
Text = new OsuSpriteText
{
Margin = new MarginPadding(5),
Origin = Anchor.CentreLeft,
Anchor = Anchor.CentreLeft,
Text = value.ToString(),
Font = OsuFont.GetFont(size: 18),
Width = 115f,
Padding = new MarginPadding(5)
{
Left = LeftTextPadding,
Right = RightTextPadding,
},
RelativeSizeAxes = Axes.X,
Truncate = true,
},
CloseButton = new TabCloseButton
@ -111,6 +115,10 @@ public ChannelTabItem(Channel value)
};
}
protected virtual float LeftTextPadding => 5;
protected virtual float RightTextPadding => IsRemovable ? 40 : 5;
protected virtual IconUsage DisplayIcon => FontAwesome.Solid.Hashtag;
protected virtual bool ShowCloseOnHover => true;

View File

@ -62,12 +62,10 @@ public PrivateChannelTabItem(Channel value)
});
avatar.OnLoadComplete += d => d.FadeInFromZero(300, Easing.OutQuint);
Text.X = ChatOverlay.TAB_AREA_HEIGHT;
Text.Width = 100f;
}
protected override float LeftTextPadding => base.LeftTextPadding + ChatOverlay.TAB_AREA_HEIGHT;
protected override bool ShowCloseOnHover => false;
protected override void FadeActive()