mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-06-20 23:54:26 +08:00
0.7.0.0
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Media;
|
||||
|
||||
namespace LanMountainDesktop.DesktopComponents.Runtime;
|
||||
|
||||
public readonly record struct ComponentAdaptiveTextLayout(
|
||||
double FontSize,
|
||||
FontWeight Weight,
|
||||
int MaxLines,
|
||||
double LineHeight,
|
||||
double OverflowScore,
|
||||
bool FitsCompletely,
|
||||
Size MeasuredSize)
|
||||
{
|
||||
public double MeasuredWidth => MeasuredSize.Width;
|
||||
|
||||
public double MeasuredHeight => MeasuredSize.Height;
|
||||
}
|
||||
|
||||
public readonly record struct ComponentBoxLayout(
|
||||
double Width,
|
||||
double Height,
|
||||
Thickness Margin,
|
||||
Thickness Padding)
|
||||
{
|
||||
public double Size => Math.Max(Width, Height);
|
||||
|
||||
public bool IsSquare => Math.Abs(Width - Height) <= 0.001d;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user