mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 08:49:59 +09:00
Fix margins and spacing between sub flowed items
This commit is contained in:
@ -32,13 +32,13 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
public TabletAreaSelection(ITabletHandler handler)
|
public TabletAreaSelection(ITabletHandler handler)
|
||||||
{
|
{
|
||||||
this.handler = handler;
|
this.handler = handler;
|
||||||
|
|
||||||
|
Padding = new MarginPadding { Horizontal = SettingsPanel.CONTENT_MARGINS };
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
Padding = new MarginPadding(5);
|
|
||||||
|
|
||||||
InternalChild = tabletContainer = new Container
|
InternalChild = tabletContainer = new Container
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
@ -131,7 +131,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
if (size == System.Drawing.Size.Empty)
|
if (size == System.Drawing.Size.Empty)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
float fitX = size.Width / DrawWidth;
|
float fitX = size.Width / (DrawWidth - Padding.Left - Padding.Right);
|
||||||
float fitY = size.Height / DrawHeight;
|
float fitY = size.Height / DrawHeight;
|
||||||
|
|
||||||
float adjust = MathF.Max(fitX, fitY);
|
float adjust = MathF.Max(fitX, fitY);
|
||||||
|
@ -10,6 +10,7 @@ using osu.Framework.Input.Handlers.Tablet;
|
|||||||
using osu.Framework.Platform;
|
using osu.Framework.Platform;
|
||||||
using osu.Framework.Threading;
|
using osu.Framework.Threading;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Settings.Sections.Input
|
namespace osu.Game.Overlays.Settings.Sections.Input
|
||||||
{
|
{
|
||||||
@ -67,12 +68,14 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
Text = "No tablet detected!",
|
Text = "No tablet detected!",
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
|
Padding = new MarginPadding { Horizontal = SettingsPanel.CONTENT_MARGINS }
|
||||||
},
|
},
|
||||||
mainSettings = new FillFlowContainer
|
mainSettings = new FillFlowContainer
|
||||||
{
|
{
|
||||||
Alpha = 0,
|
Alpha = 0,
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
|
Spacing = new Vector2(0, 8),
|
||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Vertical,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
@ -80,7 +83,6 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Height = 300,
|
Height = 300,
|
||||||
Margin = new MarginPadding(10)
|
|
||||||
},
|
},
|
||||||
new DangerousSettingsButton
|
new DangerousSettingsButton
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user