mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-06-21 16:14:28 +08:00
0.3.0
自习组件加入
This commit is contained in:
@@ -426,30 +426,34 @@ public partial class ExtendedWeatherWidget : UserControl, IDesktopComponentWidge
|
||||
var compactness = Math.Clamp((0.90 - scale) / 0.55, 0, 1);
|
||||
LayoutRoot.RowSpacing = Math.Clamp(height * 0.012, 5, 13);
|
||||
SummaryGrid.ColumnSpacing = Math.Clamp(width * 0.016, 8, 22);
|
||||
SummaryInfoGrid.ColumnSpacing = Math.Clamp(width * 0.010, 6, 14);
|
||||
SummaryInfoGrid.RowSpacing = Math.Clamp(height * 0.003, 1, 4);
|
||||
BottomInfoStack.Spacing = Math.Clamp(2.2 * scale, 1, 6);
|
||||
ConditionRangeStack.Spacing = Math.Clamp(7 * scale, 4, 13);
|
||||
HourlyGrid.ColumnSpacing = Math.Clamp(width * 0.007, 3, 10);
|
||||
DailyGrid.RowSpacing = Math.Clamp(height * 0.009, 4, 10);
|
||||
TemperatureTextBlock.FontSize = Math.Clamp(height * 0.18, 52, 154);
|
||||
TemperatureTextBlock.FontWeight = ToVariableWeight(Lerp(300, 370, Math.Clamp((scale - 0.50) / 1.2, 0, 1)));
|
||||
var cityFontSize = Math.Clamp(height * 0.040, 12, 30);
|
||||
var topInfoFontSize = Math.Clamp(height * 0.044, 12, 32);
|
||||
var topScaleH = Math.Clamp(height / 640d, 0.62, 2.0);
|
||||
var topScaleW = Math.Clamp(width / 640d, 0.62, 2.0);
|
||||
var topScale = Math.Clamp((topScaleH * 0.68) + (topScaleW * 0.32), 0.62, 2.0);
|
||||
var cityFontSize = Math.Clamp(18 * topScale, 11, 26);
|
||||
var conditionFontSize = Math.Clamp(19 * topScale, 12, 27);
|
||||
var rangeFontSize = Math.Clamp(20 * topScale, 12, 30);
|
||||
CityTextBlock.FontSize = cityFontSize;
|
||||
ConditionTextBlock.FontSize = topInfoFontSize;
|
||||
RangeTextBlock.FontSize = topInfoFontSize;
|
||||
CityTextBlock.FontWeight = ToVariableWeight(Lerp(520, 590, Math.Clamp((scale - 0.50) / 1.2, 0, 1)));
|
||||
var topInfoWeight = ToVariableWeight(Lerp(570, 630, Math.Clamp((scale - 0.50) / 1.2, 0, 1)));
|
||||
ConditionTextBlock.FontWeight = topInfoWeight;
|
||||
RangeTextBlock.FontWeight = topInfoWeight;
|
||||
CityTextBlock.LineHeight = cityFontSize * 1.10;
|
||||
ConditionTextBlock.LineHeight = topInfoFontSize * 1.08;
|
||||
RangeTextBlock.LineHeight = topInfoFontSize * 1.08;
|
||||
ConditionTextBlock.FontSize = conditionFontSize;
|
||||
RangeTextBlock.FontSize = rangeFontSize;
|
||||
CityTextBlock.FontWeight = ToVariableWeight(540);
|
||||
ConditionTextBlock.FontWeight = ToVariableWeight(600);
|
||||
RangeTextBlock.FontWeight = ToVariableWeight(620);
|
||||
CityTextBlock.LineHeight = cityFontSize * 1.08;
|
||||
ConditionTextBlock.LineHeight = conditionFontSize * 1.06;
|
||||
RangeTextBlock.LineHeight = rangeFontSize * 1.06;
|
||||
var iconSize = Math.Clamp(height * 0.116, 36, 102);
|
||||
WeatherIconImage.Width = iconSize;
|
||||
WeatherIconImage.Height = iconSize;
|
||||
ConditionTextBlock.MaxWidth = Math.Clamp(width * 0.24, 88, 280);
|
||||
RangeTextBlock.MaxWidth = Math.Clamp(width * 0.17, 72, 210);
|
||||
CityTextBlock.MaxWidth = Math.Clamp(width * 0.30, 96, 320);
|
||||
ConditionTextBlock.MaxWidth = Math.Clamp(width * 0.24, 58, 220);
|
||||
RangeTextBlock.MaxWidth = Math.Clamp(width * 0.30, 88, 270);
|
||||
CityTextBlock.MaxWidth = Math.Clamp(width * 0.36, 112, 300);
|
||||
|
||||
HourlyPanelBorder.Padding = new Thickness(0);
|
||||
HourlyPanelBorder.CornerRadius = new CornerRadius(0);
|
||||
|
||||
Reference in New Issue
Block a user