Minor UI fixes

This commit is contained in:
Loporrit
2023-12-12 01:55:24 +00:00
parent 748d6184fc
commit c1b21383ef
6 changed files with 21 additions and 29 deletions

View File

@@ -573,7 +573,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
{
ColorTextWrapped("Note: The storage folder should be somewhere close to root (i.e. C:\\LoporritStorage) in a new empty folder. DO NOT point this to your game folder. DO NOT point this to your Penumbra folder.", ImGuiColors.DalamudYellow);
var cacheDirectory = _configService.Current.CacheFolder;
ImGui.SetNextItemWidth(400);
ImGui.SetNextItemWidth(400 * ImGuiHelpers.GlobalScale);
ImGui.InputText("Storage Folder##cache", ref cacheDirectory, 255, ImGuiInputTextFlags.ReadOnly);
ImGui.SameLine();
@@ -624,7 +624,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
}
float maxCacheSize = (float)_configService.Current.MaxLocalCacheInGiB;
ImGui.SetNextItemWidth(250);
ImGui.SetNextItemWidth(400 * ImGuiHelpers.GlobalScale);
if (ImGui.SliderFloat("Maximum Storage Size", ref maxCacheSize, 1f, 200f, "%.2f GiB"))
{
_configService.Current.MaxLocalCacheInGiB = maxCacheSize;
@@ -820,7 +820,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
if (string.Equals(_serverConfigurationManager.CurrentServer?.ServerName, comboEntries[i], StringComparison.OrdinalIgnoreCase))
comboEntries[i] += " [Current]";
}
ImGui.SetNextItemWidth(250);
ImGui.SetNextItemWidth(250 * ImGuiHelpers.GlobalScale);
if (ImGui.BeginCombo("Select Service", comboEntries[_serverSelectionIndex]))
{
for (int i = 0; i < comboEntries.Length; i++)
@@ -858,9 +858,9 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
if (ImGui.TreeNode("Add Custom Service"))
{
ImGui.SetNextItemWidth(250);
ImGui.SetNextItemWidth(250 * ImGuiHelpers.GlobalScale);
ImGui.InputText("Custom Service URI", ref _customServerUri, 255);
ImGui.SetNextItemWidth(250);
ImGui.SetNextItemWidth(250 * ImGuiHelpers.GlobalScale);
ImGui.InputText("Custom Service Name", ref _customServerName, 255);
if (UiSharedService.NormalizedIconTextButton(FontAwesomeIcon.Plus, "Add Custom Service")
&& !string.IsNullOrEmpty(_customServerUri)
@@ -884,7 +884,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
public void DrawTimeSpanBetweenScansSetting()
{
var timeSpan = _configService.Current.TimeSpanBetweenScansInSeconds;
ImGui.SetNextItemWidth(250);
ImGui.SetNextItemWidth(250 * ImGuiHelpers.GlobalScale);
if (ImGui.SliderInt("Seconds between scans##timespan", ref timeSpan, 20, 60))
{
_configService.Current.TimeSpanBetweenScansInSeconds = timeSpan;