mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-14 20:54:16 +01:00
fix: hidpi fixes for changelog and console windows (#1459)
This commit is contained in:
parent
90605be611
commit
a3eb270506
2 changed files with 9 additions and 9 deletions
|
|
@ -175,7 +175,7 @@ internal sealed class ChangelogWindow : Window, IDisposable
|
||||||
ImGui.Dummy(new Vector2(dummySize));
|
ImGui.Dummy(new Vector2(dummySize));
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
|
|
||||||
var logoContainerSize = new Vector2(this.Size!.Value.X * 0.2f - dummySize, this.Size!.Value.Y);
|
var logoContainerSize = new Vector2(windowSize.X * 0.2f - dummySize, windowSize.Y);
|
||||||
using (var child = ImRaii.Child("###logoContainer", logoContainerSize, false))
|
using (var child = ImRaii.Child("###logoContainer", logoContainerSize, false))
|
||||||
{
|
{
|
||||||
if (!child)
|
if (!child)
|
||||||
|
|
@ -196,7 +196,7 @@ internal sealed class ChangelogWindow : Window, IDisposable
|
||||||
ImGui.Dummy(new Vector2(dummySize));
|
ImGui.Dummy(new Vector2(dummySize));
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
|
|
||||||
using (var child = ImRaii.Child("###textContainer", new Vector2((this.Size!.Value.X * 0.8f) - dummySize * 4, this.Size!.Value.Y), false))
|
using (var child = ImRaii.Child("###textContainer", new Vector2((windowSize.X * 0.8f) - dummySize * 4, windowSize.Y), false))
|
||||||
{
|
{
|
||||||
if (!child)
|
if (!child)
|
||||||
return;
|
return;
|
||||||
|
|
@ -351,7 +351,7 @@ internal sealed class ChangelogWindow : Window, IDisposable
|
||||||
|
|
||||||
var childSize = ImGui.GetWindowSize();
|
var childSize = ImGui.GetWindowSize();
|
||||||
var closeButtonSize = 15 * ImGuiHelpers.GlobalScale;
|
var closeButtonSize = 15 * ImGuiHelpers.GlobalScale;
|
||||||
ImGui.SetCursorPos(new Vector2(childSize.X - closeButtonSize - (5 * ImGuiHelpers.GlobalScale), 10 * ImGuiHelpers.GlobalScale));
|
ImGui.SetCursorPos(new Vector2(childSize.X - closeButtonSize - 5, 10 * ImGuiHelpers.GlobalScale));
|
||||||
if (ImGuiComponents.IconButton(FontAwesomeIcon.Times))
|
if (ImGuiComponents.IconButton(FontAwesomeIcon.Times))
|
||||||
{
|
{
|
||||||
Dismiss();
|
Dismiss();
|
||||||
|
|
@ -360,9 +360,11 @@ internal sealed class ChangelogWindow : Window, IDisposable
|
||||||
|
|
||||||
ImGui.PopStyleColor(2);
|
ImGui.PopStyleColor(2);
|
||||||
ImGui.PopStyleVar();
|
ImGui.PopStyleVar();
|
||||||
|
|
||||||
if (ImGui.IsItemHovered())
|
if (ImGui.IsItemHovered())
|
||||||
|
{
|
||||||
ImGui.SetTooltip("I don't care about this");
|
ImGui.SetTooltip("I don't care about this");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@ internal class ConsoleWindow : Window, IDisposable
|
||||||
|
|
||||||
this.DrawFilterToolbar();
|
this.DrawFilterToolbar();
|
||||||
|
|
||||||
ImGui.BeginChild("scrolling", new Vector2(0, ImGui.GetFrameHeightWithSpacing() - 55), false, ImGuiWindowFlags.AlwaysHorizontalScrollbar | ImGuiWindowFlags.AlwaysVerticalScrollbar);
|
ImGui.BeginChild("scrolling", new Vector2(0, ImGui.GetFrameHeightWithSpacing() - 55 * ImGuiHelpers.GlobalScale), false, ImGuiWindowFlags.AlwaysHorizontalScrollbar | ImGuiWindowFlags.AlwaysVerticalScrollbar);
|
||||||
|
|
||||||
if (this.clearLog) this.Clear();
|
if (this.clearLog) this.Clear();
|
||||||
|
|
||||||
|
|
@ -268,11 +268,9 @@ internal class ConsoleWindow : Window, IDisposable
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.SetItemDefaultFocus();
|
ImGui.SetItemDefaultFocus();
|
||||||
if (getFocus)
|
if (getFocus) ImGui.SetKeyboardFocusHere(-1); // Auto focus previous widget
|
||||||
ImGui.SetKeyboardFocusHere(-1); // Auto focus previous widget
|
|
||||||
|
|
||||||
if (hadColor)
|
if (hadColor) ImGui.PopStyleColor();
|
||||||
ImGui.PopStyleColor();
|
|
||||||
|
|
||||||
if (ImGui.Button("Send", ImGuiHelpers.ScaledVector2(80.0f, 23.0f)))
|
if (ImGui.Button("Send", ImGuiHelpers.ScaledVector2(80.0f, 23.0f)))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue