mirror of
https://github.com/ppy/osu
synced 2024-12-26 00:32:52 +00:00
Merge pull request #22080 from Joehuu/fix-channel-listing-item-overflow
Fix channel listing items overflowing at high ui scaling
This commit is contained in:
commit
d05e84bb55
@ -38,7 +38,7 @@ namespace osu.Game.Overlays.Chat.Listing
|
||||
private Box hoverBox = null!;
|
||||
private SpriteIcon checkbox = null!;
|
||||
private OsuSpriteText channelText = null!;
|
||||
private OsuSpriteText topicText = null!;
|
||||
private OsuTextFlowContainer topicText = null!;
|
||||
private IBindable<bool> channelJoined = null!;
|
||||
|
||||
[Resolved]
|
||||
@ -65,8 +65,8 @@ namespace osu.Game.Overlays.Chat.Listing
|
||||
|
||||
Masking = true;
|
||||
CornerRadius = 5;
|
||||
RelativeSizeAxes = Axes.X;
|
||||
Height = 20 + (vertical_margin * 2);
|
||||
RelativeSizeAxes = Content.RelativeSizeAxes = Axes.X;
|
||||
AutoSizeAxes = Content.AutoSizeAxes = Axes.Y;
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
@ -79,14 +79,19 @@ namespace osu.Game.Overlays.Chat.Listing
|
||||
},
|
||||
new GridContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
ColumnDimensions = new[]
|
||||
{
|
||||
new Dimension(GridSizeMode.Absolute, 40),
|
||||
new Dimension(GridSizeMode.Absolute, 200),
|
||||
new Dimension(GridSizeMode.Absolute, 400),
|
||||
new Dimension(maxSize: 400),
|
||||
new Dimension(GridSizeMode.AutoSize),
|
||||
new Dimension(),
|
||||
new Dimension(GridSizeMode.Absolute, 50), // enough for any 5 digit user count
|
||||
},
|
||||
RowDimensions = new[]
|
||||
{
|
||||
new Dimension(GridSizeMode.AutoSize, minSize: 20 + (vertical_margin * 2)),
|
||||
},
|
||||
Content = new[]
|
||||
{
|
||||
@ -108,12 +113,13 @@ namespace osu.Game.Overlays.Chat.Listing
|
||||
Font = OsuFont.Torus.With(size: text_size, weight: FontWeight.SemiBold),
|
||||
Margin = new MarginPadding { Bottom = 2 },
|
||||
},
|
||||
topicText = new OsuSpriteText
|
||||
topicText = new OsuTextFlowContainer(t => t.Font = OsuFont.Torus.With(size: text_size))
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
Text = Channel.Topic,
|
||||
Font = OsuFont.Torus.With(size: text_size),
|
||||
Margin = new MarginPadding { Bottom = 2 },
|
||||
},
|
||||
new SpriteIcon
|
||||
|
Loading…
Reference in New Issue
Block a user