1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 10:33:30 +08:00

Fix margins and spacing between sub flowed items

This commit is contained in:
Dean Herbert 2021-03-16 23:57:05 +09:00
parent d422a65900
commit 9d0c8902a6
2 changed files with 6 additions and 4 deletions

View File

@ -32,13 +32,13 @@ namespace osu.Game.Overlays.Settings.Sections.Input
public TabletAreaSelection(ITabletHandler handler)
{
this.handler = handler;
Padding = new MarginPadding { Horizontal = SettingsPanel.CONTENT_MARGINS };
}
[BackgroundDependencyLoader]
private void load()
{
Padding = new MarginPadding(5);
InternalChild = tabletContainer = new Container
{
Anchor = Anchor.Centre,
@ -131,7 +131,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
if (size == System.Drawing.Size.Empty)
return;
float fitX = size.Width / DrawWidth;
float fitX = size.Width / (DrawWidth - Padding.Left - Padding.Right);
float fitY = size.Height / DrawHeight;
float adjust = MathF.Max(fitX, fitY);

View File

@ -10,6 +10,7 @@ using osu.Framework.Input.Handlers.Tablet;
using osu.Framework.Platform;
using osu.Framework.Threading;
using osu.Game.Graphics.Sprites;
using osuTK;
namespace osu.Game.Overlays.Settings.Sections.Input
{
@ -67,12 +68,14 @@ namespace osu.Game.Overlays.Settings.Sections.Input
Text = "No tablet detected!",
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Padding = new MarginPadding { Horizontal = SettingsPanel.CONTENT_MARGINS }
},
mainSettings = new FillFlowContainer
{
Alpha = 0,
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Spacing = new Vector2(0, 8),
Direction = FillDirection.Vertical,
Children = new Drawable[]
{
@ -80,7 +83,6 @@ namespace osu.Game.Overlays.Settings.Sections.Input
{
RelativeSizeAxes = Axes.X,
Height = 300,
Margin = new MarginPadding(10)
},
new DangerousSettingsButton
{