1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 04:07:25 +08:00

Fix misaligned settings buttons

This commit is contained in:
Shane Woolcock 2017-10-21 13:16:06 +10:30
parent 2c7343e965
commit 98044a17d3
9 changed files with 28 additions and 18 deletions

View File

@ -28,6 +28,7 @@ namespace osu.Game.Overlays.KeyBinding
this.variant = variant;
FlowContent.Spacing = new Vector2(0, 1);
FlowContent.Padding = new MarginPadding { Left = SettingsOverlay.CONTENT_MARGINS, Right = SettingsOverlay.CONTENT_MARGINS };
}
[BackgroundDependencyLoader]

View File

@ -22,9 +22,8 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
LabelText = "Audio Offset",
Bindable = config.GetBindable<double>(OsuSetting.AudioOffset)
},
new OsuButton
new SettingsButton
{
RelativeSizeAxes = Axes.X,
Text = "Offset wizard"
}
};

View File

@ -24,9 +24,8 @@ namespace osu.Game.Overlays.Settings.Sections.Debug
LabelText = "Active mode",
Bindable = config.GetBindable<GCLatencyMode>(DebugSetting.ActiveGCMode)
},
new OsuButton
new SettingsButton
{
RelativeSizeAxes = Axes.X,
Text = "Force garbage collection",
Action = GC.Collect
},

View File

@ -230,15 +230,13 @@ namespace osu.Game.Overlays.Settings.Sections.General
LabelText = "Stay logged in",
Bindable = config.GetBindable<bool>(OsuSetting.SavePassword),
},
new OsuButton
new SettingsButton
{
RelativeSizeAxes = Axes.X,
Text = "Sign in",
Action = performLogin
},
new OsuButton
new SettingsButton
{
RelativeSizeAxes = Axes.X,
Text = "Register new account",
//Action = registerLink
}

View File

@ -23,9 +23,8 @@ namespace osu.Game.Overlays.Settings.Sections.General
LabelText = "Release stream",
Bindable = config.GetBindable<ReleaseStream>(OsuSetting.ReleaseStream),
},
new OsuButton
new SettingsButton
{
RelativeSizeAxes = Axes.X,
Text = "Open osu! folder",
Action = storage.OpenInNativeExplorer,
}

View File

@ -14,9 +14,8 @@ namespace osu.Game.Overlays.Settings.Sections.Input
{
Children = new Drawable[]
{
new OsuButton
new SettingsButton
{
RelativeSizeAxes = Axes.X,
Text = "Key Configuration",
Action = keyConfig.ToggleVisibility
},

View File

@ -22,9 +22,8 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
{
Children = new Drawable[]
{
importButton = new OsuButton
importButton = new SettingsButton
{
RelativeSizeAxes = Axes.X,
Text = "Import beatmaps from stable",
Action = () =>
{
@ -32,9 +31,8 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
Task.Run(() => beatmaps.ImportFromStable()).ContinueWith(t => Schedule(() => importButton.Enabled.Value = true));
}
},
deleteButton = new OsuButton
deleteButton = new SettingsButton
{
RelativeSizeAxes = Axes.X,
Text = "Delete ALL beatmaps",
Action = () =>
{
@ -42,9 +40,8 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
Task.Run(() => beatmaps.DeleteAll()).ContinueWith(t => Schedule(() => deleteButton.Enabled.Value = true));
}
},
restoreButton = new OsuButton
restoreButton = new SettingsButton
{
RelativeSizeAxes = Axes.X,
Text = "Restore all hidden difficulties",
Action = () =>
{

View File

@ -0,0 +1,17 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using osu.Framework.Graphics;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays.Settings.Sections
{
public class SettingsButton : OsuButton
{
public SettingsButton()
{
RelativeSizeAxes = Axes.X;
Padding = new MarginPadding { Left = SettingsOverlay.CONTENT_MARGINS, Right = SettingsOverlay.CONTENT_MARGINS };
}
}
}

View File

@ -288,6 +288,7 @@
<Compile Include="Migrations\OsuDbContextModelSnapshot.cs" />
<Compile Include="Online\API\Requests\GetBeatmapSetRequest.cs" />
<Compile Include="Online\API\Requests\GetBeatmapSetsResponse.cs" />
<Compile Include="Overlays\Settings\SettingsButton.cs" />
<Compile Include="Screens\Edit\Screens\Compose\Timeline\BeatmapWaveformGraph.cs" />
<Compile Include="Beatmaps\Drawables\DifficultyColouredContainer.cs" />
<Compile Include="Beatmaps\Drawables\DifficultyIcon.cs" />