Lock inspect preview size
This commit is contained in:
@@ -72,6 +72,15 @@ namespace UIFixes
|
||||
[PatchPostfix]
|
||||
private static void Postfix(ItemSpecificationPanel __instance, LayoutElement ___layoutElement_0)
|
||||
{
|
||||
if (Settings.LockInspectPreviewSize.Value)
|
||||
{
|
||||
LayoutElement previewPanel = __instance.GetComponentsInChildren<LayoutElement>().FirstOrDefault(e => e.name == "Preview Panel");
|
||||
if (previewPanel != null)
|
||||
{
|
||||
previewPanel.flexibleHeight = -1;
|
||||
}
|
||||
}
|
||||
|
||||
Button closeButton = __instance.GetComponentsInChildren<Button>().FirstOrDefault(b => b.name == "Close Button");
|
||||
if (closeButton != null)
|
||||
{
|
||||
|
||||
10
Settings.cs
10
Settings.cs
@@ -32,6 +32,7 @@ namespace UIFixes
|
||||
public static ConfigEntry<TransferConfirmationOption> ShowTransferConfirmations { get; set; }
|
||||
public static ConfigEntry<bool> ShowModStats { get; set; }
|
||||
public static ConfigEntry<bool> RememberInspectSize { get; set; }
|
||||
public static ConfigEntry<bool> LockInspectPreviewSize { get; set; }
|
||||
|
||||
// Input
|
||||
public static ConfigEntry<bool> UseHomeEnd { get; set; }
|
||||
@@ -92,6 +93,15 @@ namespace UIFixes
|
||||
null,
|
||||
new ConfigurationManagerAttributes { })));
|
||||
|
||||
configEntries.Add(LockInspectPreviewSize = config.Bind(
|
||||
GeneralSection,
|
||||
"Lock Inspect Preview Size",
|
||||
true,
|
||||
new ConfigDescription(
|
||||
"Keep the 3D preview from growing when you resize inspect panels",
|
||||
null,
|
||||
new ConfigurationManagerAttributes { })));
|
||||
|
||||
// Input
|
||||
configEntries.Add(UseHomeEnd = config.Bind(
|
||||
InputSection,
|
||||
|
||||
Reference in New Issue
Block a user