mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-14 04:34:16 +01:00
Account for UiScale when moving nodes
This commit is contained in:
parent
48e60a7a5d
commit
dae105d157
1 changed files with 2 additions and 2 deletions
|
|
@ -235,7 +235,7 @@ public sealed unsafe class DtrBar : IDisposable, IServiceType, IDtrBar
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// If we want the node hidden, shift it up, to prevent collision conflicts
|
// If we want the node hidden, shift it up, to prevent collision conflicts
|
||||||
data.TextNode->AtkResNode.SetY(-collisionNode->Height);
|
data.TextNode->AtkResNode.SetY(-collisionNode->Height * dtr->RootNode->ScaleX);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -264,7 +264,7 @@ public sealed unsafe class DtrBar : IDisposable, IServiceType, IDtrBar
|
||||||
if (!this.configuration.DtrSwapDirection)
|
if (!this.configuration.DtrSwapDirection)
|
||||||
{
|
{
|
||||||
var targetSize = (ushort)this.CalculateTotalSize();
|
var targetSize = (ushort)this.CalculateTotalSize();
|
||||||
var sizeDelta = targetSize - addon->RootNode->Width;
|
var sizeDelta = MathF.Round((targetSize - addon->RootNode->Width) * addon->RootNode->ScaleX);
|
||||||
|
|
||||||
if (addon->RootNode->Width != targetSize)
|
if (addon->RootNode->Width != targetSize)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue