Skip to content

Commit

Permalink
Apply min and max hiehgt in list edit item.
Browse files Browse the repository at this point in the history
  • Loading branch information
andy840119 committed Dec 6, 2020
1 parent 7791e7b commit e44b1f7
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Rulesets.Karaoke.Edit.Lyrics.Components;
using osu.Game.Rulesets.Karaoke.Edit.Lyrics.Components.Badges;
using osu.Game.Rulesets.Karaoke.Edit.Lyrics.Components.Infos;
using osu.Game.Rulesets.Karaoke.Objects;
using osuTK;
Expand All @@ -20,6 +19,8 @@ public class DrawableLyricEditListItem : OsuRearrangeableListItem<Lyric>
{
private const int continuous_spacing = 20;
private const int info_part_spacing = 200;
private const int min_height = 75;
private const int max_height = 120;

private Box background;
private Box dragAlert;
Expand Down Expand Up @@ -68,19 +69,20 @@ protected override Drawable CreateContent()
new Dimension(GridSizeMode.Absolute, info_part_spacing - continuousSpacing),
new Dimension(GridSizeMode.Distributed)
},
RowDimensions = new[] { new Dimension(GridSizeMode.AutoSize) },
RowDimensions = new[] { new Dimension(GridSizeMode.AutoSize, minSize: min_height, maxSize: max_height) },
Content = new[]
{
new[]
{
new Container
{
RelativeSizeAxes = Axes.Both,
RelativeSizeAxes = Axes.X,
Children = new Drawable[]
{
headerBackground = new Box
{
RelativeSizeAxes = Axes.Both,
RelativeSizeAxes = Axes.X,
Height = max_height,
Alpha = 0.7f
},
new BadgeFillFlowContainer
Expand Down

0 comments on commit e44b1f7

Please sign in to comment.