mirror of
https://github.com/cyanfish/naps2.git
synced 2024-09-11 15:26:55 +03:00
Simplify layout ZeroSpace -> Filler
This commit is contained in:
parent
f100479401
commit
895ff04ef7
@ -76,14 +76,11 @@ public static class C
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a null placeholder for Eto layouts.
|
||||
///
|
||||
/// For example, it can be added to a row or column to absorb scaling.
|
||||
/// If it isn't at the end of the row/column, it must be annotated with .XScale() or .YScale().
|
||||
/// Creates a null placeholder for Eto layouts that absorbs scaling.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static ControlWithLayoutAttributes ZeroSpace() =>
|
||||
new ControlWithLayoutAttributes(null);
|
||||
public static ControlWithLayoutAttributes Filler() =>
|
||||
new ControlWithLayoutAttributes(null).XScale().YScale();
|
||||
|
||||
/// <summary>
|
||||
/// Creates an label of default height to be used as a visual paragraph separator.
|
||||
|
@ -52,10 +52,10 @@ public class AboutForm : EtoDialogBase
|
||||
L.Row(
|
||||
L.Column(
|
||||
C.NoWrap(string.Format(MiscResources.Version, AssemblyHelper.Version)),
|
||||
C.Link(NAPS2_HOMEPAGE)
|
||||
C.UrlLink(NAPS2_HOMEPAGE)
|
||||
),
|
||||
L.Column(
|
||||
C.ZeroSpace().YScale(),
|
||||
C.Filler(),
|
||||
_donateButton
|
||||
).Padding(left: 10)
|
||||
),
|
||||
@ -68,14 +68,13 @@ public class AboutForm : EtoDialogBase
|
||||
L.Row(
|
||||
L.Column(
|
||||
C.NoWrap(UiStrings.IconsFrom),
|
||||
C.Link(ICONS_HOMEPAGE)
|
||||
C.UrlLink(ICONS_HOMEPAGE)
|
||||
).XScale(),
|
||||
L.Column(
|
||||
C.ZeroSpace().YScale(),
|
||||
C.Filler(),
|
||||
C.Button(UiStrings.OK, Close)
|
||||
).Padding(left: 20)
|
||||
),
|
||||
C.ZeroSpace()
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -152,13 +152,12 @@ public class EditProfileForm : EtoDialogBase
|
||||
),
|
||||
L.Row(
|
||||
_enableAutoSave,
|
||||
_autoSaveSettings,
|
||||
C.ZeroSpace().XScale()
|
||||
_autoSaveSettings
|
||||
),
|
||||
C.ZeroSpace().YScale(),
|
||||
C.Filler(),
|
||||
L.Row(
|
||||
_advanced,
|
||||
C.ZeroSpace().XScale(),
|
||||
C.Filler(),
|
||||
_ok,
|
||||
_cancel
|
||||
)
|
||||
|
@ -138,8 +138,7 @@ public class ProfilesForm : EtoDialogBase
|
||||
L.Row(
|
||||
C.Button(_addCommand, ButtonImagePosition.Left),
|
||||
C.Button(_editCommand, ButtonImagePosition.Left),
|
||||
C.Button(_deleteCommand, ButtonImagePosition.Left),
|
||||
C.ZeroSpace().XScale()
|
||||
C.Button(_deleteCommand, ButtonImagePosition.Left)
|
||||
)
|
||||
),
|
||||
C.Button(UiStrings.Done, Close)
|
||||
|
@ -31,7 +31,7 @@ public class ProgressForm : EtoDialogBase
|
||||
_progressBar.Size(420, 40),
|
||||
L.Row(
|
||||
_numeric,
|
||||
C.ZeroSpace().XScale(),
|
||||
C.Filler(),
|
||||
_runInBg,
|
||||
_cancel
|
||||
)
|
||||
|
@ -37,8 +37,7 @@ public class SelectDeviceForm : EtoDialogBase
|
||||
_devices.NaturalSize(150, 100).XScale(),
|
||||
L.Column(
|
||||
selectButton,
|
||||
cancelButton,
|
||||
C.ZeroSpace().YScale()
|
||||
cancelButton
|
||||
)
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user