mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-06-22 00:54:26 +08:00
0.2.8
天气组件、倒计时组件微调。引入浏览器组件。
This commit is contained in:
@@ -426,22 +426,30 @@ 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);
|
||||
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)));
|
||||
CityTextBlock.FontSize = Math.Clamp(height * 0.040, 12, 30);
|
||||
ConditionTextBlock.FontSize = Math.Clamp(height * 0.046, 13, 34);
|
||||
RangeTextBlock.FontSize = Math.Clamp(height * 0.043, 12, 32);
|
||||
var cityFontSize = Math.Clamp(height * 0.040, 12, 30);
|
||||
var topInfoFontSize = Math.Clamp(height * 0.044, 12, 32);
|
||||
CityTextBlock.FontSize = cityFontSize;
|
||||
ConditionTextBlock.FontSize = topInfoFontSize;
|
||||
RangeTextBlock.FontSize = topInfoFontSize;
|
||||
CityTextBlock.FontWeight = ToVariableWeight(Lerp(520, 590, Math.Clamp((scale - 0.50) / 1.2, 0, 1)));
|
||||
ConditionTextBlock.FontWeight = ToVariableWeight(Lerp(560, 630, Math.Clamp((scale - 0.50) / 1.2, 0, 1)));
|
||||
RangeTextBlock.FontWeight = ToVariableWeight(Lerp(560, 620, 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;
|
||||
var iconSize = Math.Clamp(height * 0.116, 36, 102);
|
||||
WeatherIconImage.Width = iconSize;
|
||||
WeatherIconImage.Height = iconSize;
|
||||
ConditionTextBlock.MaxWidth = Math.Clamp(width * 0.20, 80, 240);
|
||||
RangeTextBlock.MaxWidth = Math.Clamp(width * 0.20, 80, 240);
|
||||
CityTextBlock.MaxWidth = Math.Clamp(width * 0.28, 90, 290);
|
||||
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);
|
||||
|
||||
HourlyPanelBorder.Padding = new Thickness(0);
|
||||
HourlyPanelBorder.CornerRadius = new CornerRadius(0);
|
||||
|
||||
Reference in New Issue
Block a user