mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-15 20:37:42 +01:00
Add SetFontScaleMode(ImFontPtr, FontScaleMode) (#1666)
* Add SetFontScaleMode(ImFontPtr, FontScaleMode) `IgnoreGlobalScale` was advertised as "excludes the given font from global scaling", but the intent I had in mind was "excludes the given font from being scaled in any manner". As the latter functionality is needed, obsoleted `IgnoreGlobalScale` and added `SetFontScaleMode`. * Make it correct * Name consistency
This commit is contained in:
parent
7dc99c9307
commit
2d8b71c647
9 changed files with 166 additions and 66 deletions
|
|
@ -342,9 +342,7 @@ public sealed class SingleFontChooserDialog : IDisposable
|
|||
{
|
||||
this.fontHandle ??= this.selectedFont.CreateFontHandle(
|
||||
this.atlas,
|
||||
tk =>
|
||||
tk.OnPreBuild(e => e.IgnoreGlobalScale(e.Font))
|
||||
.OnPostBuild(e => e.Font.AdjustGlyphMetrics(1f / e.Scale)));
|
||||
tk => tk.OnPreBuild(e => e.SetFontScaleMode(e.Font, FontScaleMode.UndoGlobalScale)));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -837,7 +835,7 @@ public sealed class SingleFontChooserDialog : IDisposable
|
|||
var changed = false;
|
||||
|
||||
if (!ImGui.BeginTable("##advancedOptions", 4))
|
||||
return changed;
|
||||
return false;
|
||||
|
||||
var labelWidth = ImGui.CalcTextSize("Letter Spacing:").X;
|
||||
labelWidth = Math.Max(labelWidth, ImGui.CalcTextSize("Offset:").X);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue